Cognizant Interview Question

Write a code to check Armstrong number