Assalamu Alaikum. Hope, you all are well by the grace of Almighty ALLAH. Today we learn how to find out the Armstrong number up to a limit. Take a look at the problem.
Problem: Write a program that prints the list of all Armstrong numbers up to the limit. User will input the value of the limit.
Solution:
A number is Armstrong if the sum of cubes of individual digits of a number is equal to the number itself. For example 371 is an Armstrong number as 3^3 + 7^3 + 1^3 = 371. Some other Armstrong numbers are 0, 1, 153, 370, 407.
Now take a look at the program.
Problem: Write a program that prints the list of all Armstrong numbers up to the limit. User will input the value of the limit.
Solution:
A number is Armstrong if the sum of cubes of individual digits of a number is equal to the number itself. For example 371 is an Armstrong number as 3^3 + 7^3 + 1^3 = 371. Some other Armstrong numbers are 0, 1, 153, 370, 407.
Now take a look at the program.
Thank you all..
0 comments:
Post a Comment