#include <stdio.h> int main() { int n, n1, rev = 0, rem; printf("Enter any number: \n"); scanf("%d", &n); n1 = n; /* logic */ while (n > 0){ rem = n % 10; rev = rev * 10 + rem; n = n / 10; } if (n1 == rev){ printf("Given number is a palindromic number"); } else{ printf("Given number is not a palindromic number"); } return 0; }
You don't have to write palindrome programs in wikipedia.
sdfdg
Prepare the string for processing: Remove all punctuation from the string (e.g., commas, hyphens, whitespace, etc). Convert to the same case (e.g., lower-case). Instantiate two pointers, one pointing at the first character, the other pointing at the last character. Process: If the two pointers are pointing at the same position or have crossed each other, the string is a palindrome. Otherwise, compare the characters being pointed at. If they are not equal, the string is not a palindrome. Otherwise, move both pointers one position towards the middle of the string and repeat the process.
first think of the logic and then write the statements
Any of these: PRINT semicolon EMIT ; WRITE ";" etc.
int pallindrom(int p){ /*write all logic*/ }
because no number starts with 0. A palindrome has to start and end with the same number. For example you would have to write 020 (twenty) for it to be considered a palindrome, and that would not be the correct way to write numbers.
Palindrome numbers are numbers that read the same backwards and forwards, like 32923
You don't have to write palindrome programs in wikipedia.
10+1=11 (which is a palindrome)
Probably a misspelling of palindrome numbers.
23932
Yes.
please somebody should help me answer this question..I have a project on it even! It seems almost impossible at the moment.
stats
There is no limit to numbers, thus there is no limit to palindrome numbers.
45654 is a palindrome.