vacendak icon

Math Problem 02

vacendak | PRO | 07/15/18 09:19:58 PM UTC | 0 ⭐ | 351 👁️ | Never ⏰ | []
C |

610 B

|

None

|

0 👍

/

0 👎

#include <stdio.h>
#include <math.h>
 
 
int main(int argc, char *argv[])
{
 
    unsigned long long int w = 0, x = 0 , y = 0, z = 0;
    unsigned long long int MaxX=10000;
 
    printf("\n\tSoluciones: ");
 
    for (x = 10; x < MaxX; x++)
        {
            z = x*x-1;
        if (z%1141==0)
            {
            w = (x*x-1)/1141;
                for (y = 1;y < w; y++)
                {
                    if (y*y == w)
                    {
                        printf("\t%d", y);
                    }
                }
            }
        }
 
    printf("\n\n");
    return 0;
}

Comments