#include <stdio.h>

main()
{
int x, y, z, d;

for(x = 1 ; x <= 20 ; x++)
{
for(y = 1 ; y <= 20 ; y++)
{
if(y < x)
continue;
for(z = 1 ; z <= 20 ; z++)
{
if(z < x)
continue;
d = x * x + y * y;

if(d == (z * z))
printf("x = %2d, y = %2d, z = %3d \n", x, y, z);
}
}
}
}

 

+ Recent posts