Please anyone explain me how to make program of Armstrong number in c | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Please anyone explain me how to make program of Armstrong number in c

What is Armstrong number

17th Feb 2018, 8:06 PM
piyush srivastava
piyush srivastava - avatar
2 Answers
+ 7
Go to Code Playground (the section with {} symbol in the app), to the left top, in the Search bar type "armstrong" and to the top right most, pick C from the language filter, you'll see loads of others' work to learn from. Good luck : )
17th Feb 2018, 8:12 PM
Ipang
+ 2
-take modulus of inputed number by 10 ex : 153%10=3 -divide inputed number by 10 153/10=15 -add digit to 1, or ++ -repeat process above as digit number, in that case is 3 -i suggest to put inputed number to different variable with processed number (number that will be divided) -if all number that has been taken from modulus than powered to digit number, then all the powered number sum is same with inputed number, that inputed number is an armstrong number
25th Feb 2018, 10:53 AM
Nino Fachrurozy
Nino Fachrurozy - avatar