Number Program-11||Sunny Number in Java || Interview Question

Publicado el: 05 julio 2023
en el canal de: Tech Factory
269
4

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


En esta página del sitio puede ver el video en línea Number Program-11||Sunny Number in Java || Interview Question de Duración hora minuto segunda en buena calidad , que subió el usuario Tech Factory 05 julio 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 269 veces y le gustó 4 a los espectadores. Disfruta viendo!