write a program that input four digit no and finds it is
palindrome or not
Answers were Sorted based on User's Feedback
#include<stdio.h>
#include<conio.h>
void main()
{
int n,rev=0,rem, temp,i;
printf(" Enter the 4 digit number :\n");
scanf("%d", &n);
temp = n;
for(i=1;i<=4;i++)
{
rem = n % 10;
n = n/10;
rev = rev * 10 + rem;
}
if(temp == rev)
printf(" Its a palindrome:\n");
else
printf(" Not a palindrome:\n");
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Waht is inheritance
What is the underlying datastructure of map?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
What are stl algorithms?
totoo po ba ang manga aliens!
What is Constructor
what is the difference between thread and process
What is Template Specialization?
what's the difference between abstract class and concreate class? what's the meaning of standard template library(STL)?
Who created stl?
Is stl open source?
a program using one dimensional array that searches a number if it is found on the list of given input numbers given by the user and locate its exact location in the list.