2:18 PM
C++ Program of PALINDROME NUMBER

Write a Program of PALINDROME NUMBER.

#include<iostream.h> 
#include<conio.h> 
 
void main()
{
int num,r,sum=0,temp;
clrscr();
printf("\nEnter a number:");
scanf("%d",&num);
temp=num;
while(num)
{
r=num%10;
num=num/10;
sum=sum*10+r;
}
if(temp==sum)
printf("\n%d is a palindrome",temp);
else
printf("\n%d is not a palindrome",temp);
getch();
}
 
 
 
 
Note:    
           If you want to change in this program please write through the comment on this page. you can also past similar program of 
             c++ with output.your comment is valuable to the other user and person.
Views: 122 | Added by: vijoriya | Tags: c++, Palindrome, Number, program | Rating: 0.0/0
Total comments: 0
avatar