Pergunta de entrevista da empresa Tech Mahindra

Write a simple program to check if a number is an Armstrong number.