Good evening,

I'm glad to be a new member for this board.

For an exercise, I must find all integer solutions to the equation x^2 + y ^2 = 1600, where x >= 0 and y >= 0 and I can't have reversed numbers, for instance, x = 0 and y = 40 or x = 40 and y = 0.

I was thinking of starting x = 0 and incrementing it and having y = 40 decrementing that. With that initial though, I was created this skeleton.

main()

{

int x, y;

for (x = 0; x <= 40; x++)

{

}

for (y = 40; y >= 0; y--)

{

}

}

I was wondering if this would hold as a possibility for this program and if anyone can help me set me mind to test numbers. This is my first time using a nested loop of any sort and the logic confuses me. Any help would be great. I don't need any coding, just some direction.

Thank you