write program for palindrome
Answer Posted / dharm
#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(m==s)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why was c++ created?
Which should be more useful: the protected and public virtuals?
What is searching? Explain linear and binary search.
What are arithmetic operators?
What are iterators in c++?
Write a program to find the Factorial of a number
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create
How does list r; differs from list r();?
Evaulate: 22%5 a) 2 b) 4 c) 0
When should we use container classes instead of arrays?
What is atoi in c++?
What is a stack? How it can be implemented?
What is an overflow error?
Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?
What is constructor c++?