PS: it is best not to use the function pow (); I have already started and it is wrong on this function!
[Plain] # include <stdio. h>
Int main ()
{
Int x;
Int y;
Int z;
Int flag;
Int num;
While (scanf ("% d", & num )! = EOF & (num> 0 & num <= 10000 ))
{
Flag = 0;
For (x = 1; x * x <num; x ++)
{
For (y = 1; y * y <num; y ++)
{
For (z = 1; z * z <num; z ++)
{
If (x * x + y * y + z * z = num & (x <= y & y <= z ))
{
Printf ("% d \ n", x, y, z );
Flag = 1;
Break;
}
}
If (flag)
{
Break;
}
}
If (flag)
{
Break;
}
}
}
Return 0;
}
# Include <stdio. h>
Int main ()
{
Int x;
Int y;
Int z;
Int flag;
Int num;
While (scanf ("% d", & num )! = EOF & (num> 0 & num <= 10000 ))
{
Flag = 0;
For (x = 1; x * x <num; x ++)
{
For (y = 1; y * y <num; y ++)
{
For (z = 1; z * z <num; z ++)
{
If (x * x + y * y + z * z = num & (x <= y & y <= z ))
{
Printf ("% d \ n", x, y, z );
Flag = 1;
Break;
}
}
If (flag)
{
Break;
}
}
If (flag)
{
Break;
}
}
}
Return 0;
}