bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

root / semester_1 / tuition-c / P043.c

P043.c (462B)


      1 /* Write a program to check palindrome number. */
      2 
      3 #include <stdio.h>
      4 int main()
      5 {
      6     int num, temp, rev;
      7     printf("Enter the number : ");
      8     scanf("%d", &num);
      9     temp = num;
     10     rev = 0;
     11     while (temp > 0)
     12     {
     13         rev = (rev * 10) + (temp % 10);
     14         temp /= 10;
     15     }
     16     if (num == rev)
     17     {
     18         printf("%d is a palindrome number.", num);
     19     }
     20     else
     21     {
     22         printf("%d is not a palindrome number.", num);
     23     }
     24     return 0;
     25 }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror