Write a java program to check Sunny Number in Java .
A number is said to be a Sunny number, if the square root of the next value of input number is a perfect square of any number.
Let’s check it by using the logic of Sunny number.
The next value of 80 = 80 + 1 = 81
The square root of 81 = 9
As we notice here 81 has a perfect square of 9.
Input number is 122.
Let’s check it by using the logic of Sunny number.
The next value of 122 = 122 + 1 = 123
The square root of 123 = 11.09053651
As we notice here 123 has not a perfect square.
Hence, 122 is not a Sunny number
Hence, 80 is a Sunny number.
#java
#programming
#coding
#programmer
#developer
#coder
#code
On this page of the site you can watch the video online Number Program-11||Sunny Number in Java || Interview Question with a duration of hours minute second in good quality, which was uploaded by the user Tech Factory 05 July 2023, share the link with friends and acquaintances, this video has already been watched 271 times on youtube and it was liked by 4 viewers. Enjoy your viewing!