i have written the code This is the link - https://ide.codingblocks.com/s/264105. But it is giving wrong output,it should have true as answer but it is giving false. Please help me solving.
Armstrong's Number
Your solution is wrong as your defination of armstrong number is abcd… = pow(a,n) + pow(b,n) + pow(c,n) + pow(d,n) while you are not calculating the value of n initially.
- First find the value of n( No of digits)
- Calculate the sum of values by pow(a,n) each time.
- Check the sum.
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.