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 does h mean in maths?
What does namespace mean in c++?
What is data type in c++?
Can malloc be used in c++?
What is the difference between interpreters and compilers?
List different attributes in C++?
What is the advantage of c++ over c?
What are the advantages of using typedef in a program?
Can union be self referenced?
What is a responder chain?
Is turbo c++ free?
What's the order in which the local objects are destructed?
Is c++ primer good for beginners?
Is there any function that can skip certain number of characters present in the input stream?
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. Your program should work for squares of all side sizes between 1 and 20. --- │ │ │ │ │ │ ---