write program for palindrome

Answer Posted / m.sathish krishna

#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,s=0,m;
clrscr();
printf("enter n");
scanf("%d",n);
m=n;
while(n>0)
(
r=n%10;
s=s*(10+r);
n=n/10;
}
if(m=n)
{
printf("it is palindrom");
}
else
{
printf("not a polindrom");
}
getch();
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is python better than c++?

603


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. --- │ │ │ │ │ │ ---

1661


How does c++ structure differ from c++ class?

606


what is the difference between overloading & overriding? give example.

573


Can c++ do everything c can?

612






When we use Abstract Class and when we use Interface?where we will implement in real time?

1676


Can I make ios apps with c++?

570


What is the full form nasa?

603


What are c++ templates used for?

631


What is lambda expression c++?

585


What is stoi in c++?

710


What is vectorial capacity?

658


Does c++ vector allocate memory?

544


What is the difference between the functions memmove() and memcpy()?

642


What are disadvantages of pointers?

578