Is Amstrong Number

Please let me know where is the error in my code of 1st submission as Test case 1 and Test case 0 are failiing

Hi @samyakjain1050_65748654e19948da,

You are taking a cube for each digit but you need to find pow(digit, length)

In case of 1671 => 1^4 + 6^4 + 7^4 + 1^4
You are calculating as, 1^3 + 6^3 + 7^3 + 1^3

Now i have edited the code to the best understanding i can and in VScode it giving the output of true on input 371 but here it is showing false please help with that

@samyakjain1050_65748654e19948da,

cout <<" true";
change this, remove the space
cout <<“true”;

cout <<" false";
change this, remove the space
cout <<“false”;

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.