I want to solve the problem. The problem is to check whether the number is palindrome or not.
There has been a lot of solutions that exist online. But I am trying to solve this problem through my approach without seeing any solution from the internet. I am trying this way->
#include <stdio.h>
int main(){
//Declaring variables for further proceed
int number,reminder,quotient=1;
//Just take the input from the user
printf("Input : ");
scanf("%d",&number);
while(quotient!=0){
quotient=number/10;
reminder=number%10;
printf("%d",reminder);
number=quotient;
}
return 0;
}
The problem is : My code is work for displaying the reverse order of any given number. But I could not check with this reverse order with the given number. If you can then you are most welcome. Thank you in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…