+ 2
Please anyone explain me how to make program of Armstrong number in c
What is Armstrong number
2 Antworten
+ 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 : )
+ 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