#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; }
1stly u hv to knw wat is palindrom no. ans is palindrom no. is the after doin reverse of any no. u ll get same no. called palindrom.
chart:
1. take input number
2.apply while loop(num!=0)
set condition in loop
rem=num%0;
rev=rev*10+rem;
num=num/10;
3.if(num==rev)
thn palindrom otherwise not.
so above is step and for flow chart take a box of while loop n one line coonect to condtion in the loop box and other for if condition box u ll get flow chart of it.
hope u ll got wat i said if NT reply me i ll make more understanding.
You don't have to write palindrome programs in wikipedia.
first think of the logic and then write the statements
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.
Any of these: PRINT semicolon EMIT ; WRITE ";" etc.
int pallindrom(int p){ /*write all logic*/ }
Palindrome numbers are numbers that read the same backwards and forwards, like 32923
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.
You don't have to write palindrome programs in wikipedia.
10+1=11 (which is a palindrome)
Probably a misspelling of palindrome numbers.
Yes.
23932
please somebody should help me answer this question..I have a project on it even! It seems almost impossible at the moment.
stats
Most studies in logic: Boolean algebra, predicate logic etc are independent of numbers.
There is no limit to numbers, thus there is no limit to palindrome numbers.