Arnstrong number

3 test cases are failed https://ide.codingblocks.com/s/182014

@S19LPPP0009 First mistake is that in line number 7, you must write temp=num instead of num=temp
Also your code will give correct answer only for 3 digit numbers.
Say you are given a 4 digit number 1634
1634= 1^4 + 6^4 + 3^4 + 4^4 (So 1634 is an armstrong number)
Similarly:
153= 1^3 + 5^3 + 3^3 (So 153 is an armstrong number)
So by these examples you will get what an armstrong number is.
So to check if a number is armstrong number you just have to count the number of digits and extract each digit. Maintain a sum of (digit)^ noofdigits. If at the end of the loop, this sum==the given number then the number is armstrong else it is not armstrong.