All Happy Number Between 1 to n using Java Program | Java Program |

Опубликовано: 24 Февраль 2023
на канале: CodeWithAvi
21
3

In this video we are going to learn how we can take inputs from the user as a ending Number and give an output of all Happy Number that is present between 1 and the user entered ending number using Java Program.

/*
Happy Number: Replace the number by the sum of the squares of its digits, and repeat the process . At the end, if the number is equals to 1 then it is a Happy Number, or it loops endlessly in a cycle that does not include 1 (if it is not a happy number then this process will end at 4).

For example:

23 is a Happy Number

23:- 2^2+3^2 = 13

13:- 1^2+3^2 = 10

10:- 1^2+0 = 1

As we reached to 1, 23 is a Happy Number.

42 is a UnHappy Number

42:- 4^2+2^2 = 20

20:- 2^2+0=4

As we reached to 4, 42 is a UnHappy Number.
*/


На этой странице сайта вы можете посмотреть видео онлайн All Happy Number Between 1 to n using Java Program | Java Program | длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь CodeWithAvi 24 Февраль 2023, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 21 раз и оно понравилось 3 зрителям. Приятного просмотра!