Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5. int IsSquareRoot(int n)
  6. {
  7.     if ((sqrt(n) * sqrt(n) == n))
  8.         return 1;
  9.     else
  10.         return 0;
  11.  
  12. }
  13.  
  14. int main()
  15. {
  16.     int x;
  17.     for (x = 3; x <= 100; x++)
  18.         {
  19.             if (IsSquareRoot(x) == 1)
  20.                 printf("%i is a square root\n", x);
  21.         }
  22.     return 0;
  23. }