write program for palindrome
Answer Posted / sanam baig
#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) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Is vector a class in c++?
Explain the use of virtual destructor?
How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array?how can you find the nodes with repetetive data in a linked list?
Show the declaration for a pointer to function returning long and taking an integer parameter.
what is a reference variable in C++?
Explain data encapsulation?
What are the benefits of c++?
Define basic type of variable used for a different condition in C++?
Is rust better than c++?
What is a memory leak c++?
How can we check whether the contents of two structure variables are same or not?
Are c and c++ similar?
What is encapsulation in c++ with example?
Which software is best for c++ programming?
What is the advantage of an external iterator.