bsc

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

APC-PRAC-018.c (951B)


      1 /*
      2  * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025
      3  * Repo: https://github.com/notamitgamer/bsc
      4  * License: MIT
      5  */
      6 
      7 /* Write a program to check Automorphic Number. */
      8 // File Name - amit0611202504.c (LAB), APC-PRAC-018.c (Local)
      9 
     10 // This code has not been compiled.
     11 // If you find any issues, please create a new issue on GitHub regarding them.
     12 // Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues
     13 
     14 #include <stdio.h>
     15 #include <math.h>
     16 
     17 int main()
     18 {
     19     int num, square, count = 0, temp, modNum;
     20     printf("Enter the number : ");
     21     scanf("%d", &num);
     22     square = (int)pow(num, 2);
     23     temp = num;
     24     while (temp > 0)
     25     {
     26         temp /= 10;
     27         count++;
     28     }
     29     modNum = (int)pow(10, count);
     30     temp = square % modNum;
     31     if (num == temp)
     32         printf("\nInput %d is a Automorphic Number.", num);
     33     else
     34         printf("\nInput %d is a Automorphic Number.", num);
     35     return 0;
     36 }
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror