07 - Java program to Check Armstrong Number

preview_player
Показать описание

Here we will learn a Java program to Check Armstrong Number.

A positive number is called Armstrong number if it is equal to the sum of cubes of its digits for example 0, 1, 153, 370, 371, 407 etc.
Let's try to understand why 153 is a Armstrong number.

153 = (1*1*1)+(5*5*5)+(3*3*3)  
where:  
(1*1*1)=1  
(5*5*5)=125  
(3*3*3)=27  
So:  1+125+27=153 

Additional Info

and press the bell icon to get updates on latest tutorial.
Рекомендации по теме
Комментарии
Автор

Thnqu so much sir.. good explanation sir... Thnqu

azeezkhan
Автор

Awesome explanation sir. You cleared my doubts .

rajilak
Автор

Perfect video ❤🙏❤ Awesome Explanation 🙏❤🙏

sureshnagisetty
Автор

this code works only for 3 digit numbers, what about 4 or more digit numbers??

blackytheminipanther