bsc

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

root / semester_1 / tuition-c / APC-PRAC-018.c

APC-PRAC-018.c (815B)


      1 /* Write a program to check Automorphic Number. */
      2 // File Name - amit0611202504.c (LAB), APC-PRAC-018.c (Local)
      3 
      4 // This code has not been compiled.
      5 // If you find any issues, please create a new issue on GitHub regarding them.
      6 // Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues
      7 
      8 #include <stdio.h>
      9 #include <math.h>
     10 
     11 int main()
     12 {
     13     int num, square, count = 0, temp, modNum;
     14     printf("Enter the number : ");
     15     scanf("%d", &num);
     16     square = (int)pow(num, 2);
     17     temp = num;
     18     while (temp > 0)
     19     {
     20         temp /= 10;
     21         count++;
     22     }
     23     modNum = (int)pow(10, count);
     24     temp = square % modNum;
     25     if (num == temp)
     26         printf("\nInput %d is a Automorphic Number.", num);
     27     else
     28         printf("\nInput %d is a Automorphic Number.", num);
     29     return 0;
     30 }
© 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