A number is called a sunny number if the number next to the given number is a perfect square. In other words, a number N will be a sunny number if N+1 is a perfect square.
Let's understand it through an example.
Suppose, we have to check if 80 is a sunny number or not.
Given, N=80 then N+1 will be 80+1=81, which is a perfect square of the number 9. Hence 80 is a sunny number.
Let's take another number 10.
Given, N=10 then N+1 will be 10+1=11, which is not a perfect square. Hence 10 is not a sunny number.
#sunnynumberprogrminjava
#icsecomputerapplication
#icse2024
#icseboard
#icseclass10th
#javaprogramming
#ISCjava
#icseclassix