Check if armstrong number

https://ide.codingblocks.com/s/49102
for every number i am getting true result…whts wrong in my code

Hey Amisha, that’s because you are updating the value of n in armstrong() and eventually n becomes 0. So, to resolve this you can store value of n in some other variable and then at last compare the value of that variable(i.e. initial value of n) with ans to get the correct result.