Not able to check armstrong
What part of my code is wrong i am unable to get the thing .
I checked 153 and getting true.
here u r always computing r^3 .
but actually it should be r^d where d is number of digits in given number,
for 153 it worked becaue it has 3 digits and by coincidence u r computing r^3 only
Sir how to use power in c++ in this code?
I mean how to use code a^n for n digit number.
if u want to compute a^n then use -> power(a,n)
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.