write program for palindrome
Answer Posted / varun tiwari
#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m,r;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(s == m)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What methods can be overridden in java?
How much do coding jobs pay?
What is the difference between global int and static int declaration?
What is the best way to declare and define global variables?
Is c++ a difficult language?
Are there interfaces in c++?
What is #include c++?
Can a program run without main in c++?
Why Pointers are not used in C++?
What is function prototyping? What are its advantages?
How do you save a c++ program?
Differentiate between an external iterator and an internal iterator?
Which field is used in c++?
What are the data types in c++?
Can we inherit constructor in c++?