bsc

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

P021.c (666B)


      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 /* WAP to input a positive number and check if it is a perfect
      8 square number or not. */
      9 // This code has not been compiled. 
     10 // If you find any issues, please create a new issue on GitHub regarding them.
     11 
     12 #include <stdio.h>
     13 #include <math.h>
     14 int main()
     15 {
     16     int n, temp;
     17     double sr;
     18     printf("Enter the number : ");
     19     scanf("%d", &n);
     20     sr = sqrt(n);
     21     temp = (int)sr;
     22     if (temp * temp == n)
     23         printf("\nThis is a perfect square.");
     24     else
     25         printf("\nThis is not a perfect square.");
     26     return 0;
     27 }
© 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