Write a function to check whether a number is armstrong or not

Code: