write program for palindrome
Answer Posted / madhupriya
#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==n)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is c++ try block?
What are friend functions in C++?
Can we specify variable field width in a scanf() format string? If possible how?
What is the use of main function in c++?
How a new element can be added or pushed in a stack?
Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300â€Â,â€ÂBullCart : 10â€Â) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side
What is & in c++ function?
Is python better than c++?
What is polymorphism & list its types in c++?
Why is the function main() special?
How would you implement a substr() function that extracts a sub string from a given string?
What is atoi?
What is a .h file c++?
What it is and how it might be called (2 methods).
What are abstract data types in c++?