write program for palindrome
Answer Posted / saurav sadangi
#include<stdio.h>
int main(){
int m,n,sum=0,r;
printf("Enter n: ");
scanf("%d",&n);
m=n;
while(n>0){
r=n%10;
sum=sum*10+r;
n=n/10;
}
if(sum==m){
printf("The no %d is pallendrom\n",m);
}
else{
printf("The no %d is not pallendrom\n",m);
}
system("PAUSE");
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
State the difference between pre and post increment/decrement operations.
How compile and run c++ program in turbo c++?
I want to write a C++ language program that: 1. Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. The program should work for squares of all side sizes between 1 and 20.
What is the best ide for c++?
What is constructor and destructor in c++?
Can create new c++ operators?
What is a v-table?
What is pointer -to-members in C++? Give their syntax?
What is the best c++ book?
Can java be faster than c++?
Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.
Explain one method to process an entire string as one unit?
What is lazy initialization in c++?
Why we use #include conio h in c++?
Do you know about C++ 11 standard?