Armstrong Number in Java | ISC Computer Science 2019 Theory Paper
Channel:
Subscribers:
1,540
Published on ● Video Link: https://www.youtube.com/watch?v=5tlK3WklW-0
Armstrong Number in Java | ISC Computer Science 2019 Theory Paper
Design a class ArmNum to check if a given number is an Armstrong number or not. A number is said to be Armstrong if the sum of its digits raised to the power of length of the number is equal to the number.
Example:
371 = 3^3 + 7^3 + 1^3
1634 = 1^4 + 6^4 + 3^4 + 4^4
54748 = 5^5 + 4^5 + 7^5 + 4^5 + 8^5
Thus, 371, 1634 and 54748 are all examples of Armstrong numbers.
#armstrongnumber #computerscience #isc #java
Other Videos By Robin Sir
Tags:
armstrong number
armstrong number java
computer science
isc
java