write program for palindrome
Answer Posted / deepa garia
#include<stdio.h>
#include<conio.h>
int main()
{
int r,n,k=0,l;
printf("\nENTER THE NUMBER ");
scanf("%d",&n);
l=n;
while(n>0)
{
r=n%10;
n=n/10;
k=k*10+r;
printf("%d",r);
}
if(k==l)
printf("\npalindrome");
else
printf("\n not palindrome");
getch();
return 0;
}
| Is This Answer Correct ? | 16 Yes | 13 No |
Post New Answer View All Answers
Is arr and &arr are same expression for an array?
What is the this pointer?
When should you use global variables?
Can the creation of operator** is allowed to perform the to-the-power-of operations?
Is c++ the best programming language?
What things would you remember while making an interface?
Why do we use constructor?
What is the difference between an external iterator and an internal iterator?
What are the unique features of C++.
What is the difference between an enumeration and a set of pre-processor # defines?
int age=35; if(age>80) {Console.WriteLine("Boy you are old");} else {Console.WrieLine("That is a good age");}
Write some differences between an external iterator and an internal iterator?
What is the need of a destructor?
Is c++ a programming language?
To what does “event-driven” refer?