vacendak

Math Problem 02

Jul 15th, 2018
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.61 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7.  
  8.     unsigned long long int w = 0, x = 0 , y = 0, z = 0;
  9.     unsigned long long int MaxX=10000;
  10.  
  11.     printf("\n\tSoluciones: ");
  12.  
  13.     for (x = 10; x < MaxX; x++)
  14.         {
  15.             z = x*x-1;
  16.         if (z%1141==0)
  17.             {
  18.             w = (x*x-1)/1141;
  19.                 for (y = 1;y < w; y++)
  20.                 {
  21.                     if (y*y == w)
  22.                     {
  23.                         printf("\t%d", y);
  24.                     }
  25.                 }
  26.             }
  27.         }
  28.  
  29.     printf("\n\n");
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment