+ 9
Why this code showing 153 is not an Armstrong number??
3 Answers
+ 9
I am not good at C and I only added floor to following part of code:
result += floor(pow(remainder, n));
Then it will work each Armstrong numbers.
+ 13
result is coming 152 , not 153
//its happening for 3 digit no.'s [ 15 _ ]
//for 151 , result is coming as 126 in place of 127 , 1 number less
đ see last comment on your code , might the inputs in pow (_,_), need to be in double & U also need to type cast the returning value to int
+ 9
Thank you