Lex program to check whether given number is armstrong number or not
Problem: Lex program to check whether given number is armstrong number or not.
Lex is a computer program that generates lexical analyzers and was written by Mike Lesk and Eric Schmidt. Lex reads an input stream specifying the lexical analyzer and outputs source code implementing the lexer in the C programming language.
An Armstrong number is a number that is the sum of its own digits each raised to the power of the number of digits. For example, 153 is an Armstrong number,
(1^3) + (5^3) + (3^3) = 153
Input: 153 Output: 153 is a Armstrong number Input: 250 Output: 250 is not a Armstrong number
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.