Write a program to input two digit number and check number is palindrome or not.

ABOUT PROGRAM
In this program we input a two digit number and check number is palindrome(a number which read by both side) or not. For this program we use if else statement and you should knowledge of some basic conditional statements program. So check last program.
           First,we should 1st digit by using division and 2nd digit by using modular and at the end we check that both digits or equal or not. If both are equal then we print this is palindrome or not. 

#include<stdio.h>
#include<conio.h>
void main()
{
int n,a,b;
clrscr();
printf("Enter two digit number=");
scanf("%d",&n);
a=n/10;
b=n%10;
if(a==b)
 printf("\nThis is Palindrome");
else
 printf("\nNot Palindrome number");
getch();
}

OUTPUT 
Enter two digit number=66

This is Palindrome 
                   OR
Enter two digit number=65

Not Palindrome number


Related Examples 


  1. Write a program to input length and width of a shape and find shape is square or rectangle.
  2. Write a program to input sell price and cost price and find transaction is profit or loss.
  3. Write a program to input age of any person and check he is eligible for voting or not.
  4. Write a program to input speed of Royal Enfield and check it's running at economic speed or not.

    1.  Share and Comment. 
      Follow for recently updates. 

    Comments

    Popular posts from this blog

    Write a program to input age of any person and check he is eligible for voting or not.

    Write a program to input speed of Royal Enfield and check it's running at economic speed or not.