a program in c language to check if a given number is a palindrome or not using a while loop.

Output
Enter the number
121
121 is palindrome number.


Explanation
1. Accept any number n as input from the user.
2. Initialize the variable num and put the value n in it, and also initialize rev=0.
3. Run the while loop until n becomes greater than 0.
4. Inside the while loop, reverse the number n using the formula rev=rev*10 + n%10 and recalculate the value of n as n/10 in each iteration.
5. After reversing the number, store it in the rev variable and check whether num is equal to rev or not.
6. If num is equal to rev, show the number as a palindrome.
7. Otherwise, show the number is not palindrome.


Previous :-->> 13. Write a program in c language to print the pattern of a diamond using a for loop.
 -->> NEXT: 15.Write a program in c language to find the sum of all digits of a given number.
-->>ALL Loops Assignments in c