Logic: Perfect number, a positive integer that is equal to the sum of its proper divisors. The smallest perfect number is 6, which is the sum of 1, 2, and 3.

## C program to check whether a number is Spy number or notC program to check whether a number is Spy number or not

Logic: A number is a Spy number, if sum and product of all digits are equal. Example: Number 123 is a Spy number, sum of its digits is 6 (1+2+3 =6) and product of

## C program to check whether a number is Palindrome or notC program to check whether a number is Palindrome or not

Logic: A palindromic number is a number (in some base ) that is the same when written forwards or backward. For example, 55,88,99,111,121 etc are Palindrome Numbers. Example#1: Check whether a number is Palindrome

## C program to check whether a number is Armstrong Number or notC program to check whether a number is Armstrong Number or not

Logic: Armstrong number is a number that is equal to the sum of cubes of its digits. For example, 153 is an Armstrong number because sum of cubes of its digits(1^3+5^3+3^3=153) is equal

## C program to check whether a number is Prime number or notC program to check whether a number is Prime number or not

Logic: A prime number is a whole number greater than 1 whose only factors are 1 and itself. For example, 13 is a prime number because it has only two factors 1 and 13.

## C program to find Factorial of a numberC program to find Factorial of a number

Example#1: C program to find factorial of a number Output:

## C Program to Check Whether a Number is Even or OddC Program to Check Whether a Number is Even or Odd

Logic: An even number is an integer that is exactly divisible by 2. Example: 0, 8, -24. An odd number is an integer that is not exactly divisible by 2.

## C program to accept any alphabet from the user and display it in reverse caseC program to accept any alphabet from the user and display it in reverse case

Logic: ASCII value of ‘A’=65 and ‘a’=97. Difference between the two values is (97-65)=32. So to get ‘a’ from ‘A’ we have to add 32 with ‘A’ ASCII value. Similarly,

## C program to check whether an alphabet is Vowel or ConsonantC program to check whether an alphabet is Vowel or Consonant

Logic: In English alphabet ‘A’,’E’,’I’,’O’ and ‘U’ are vowels and rest of the alphabets are consonants. This is same for lowercase characters(‘a’ to ‘z’). Example#1: Check whether an alphabet is

## C program to find ASCII value of a CharacterC program to find ASCII value of a Character

Logic: Originally based on the English alphabet, ASCII encodes 128 specified characters into seven-bit integers with values between 0 and 127. Ninety-five encoded characters are printable: these include the digits 0 to 9, lowercase letters a to z, uppercase letters A to Z,