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.
Description: Perfect number, a positive integer that is equal to the sum of its proper divisors, for example: 6 = 1+2+3.
Input: 3 Output: 3 is not perfect number Input: 6 Output: 6 is perfect number
- Check whether the number can be made perfect square after adding 1
- Lex program to Count the Positive numbers, Negative numbers and Fractions
- Lex program to check whether a given number is even or odd
- C Program for Fibonacci numbers
- C Program to Swap two Numbers
- C Program to Check if count of divisors is even or odd
- C program to check if a given string is Keyword or not
- C program to check syntax of 'for' loop
- C Program to Check Whether a Number is Prime or not
- C++ Program to check Prime Number
- Lex program to check whether the input is digit or not
- Lex program to check whether given string is Palindrome or Not
- Lex Program to check whether a number is Prime or Not
- Lex program to check whether input number is odd or even
- Lex program to check if a Date is valid or not
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.