# include "math. H"
F2 ()
{
Int a, b, c;
Int n=0;
For (a=1; a<=100; +)
For (b=a; b<=100; B++)
{
C=SQRT (a * a * b * b);
If (c<=100 & amp; & A * * b=a + b=c * c)
{
If (n % 4==0) printf (" \ n ");
n++;
Printf (" % 4 d % 4 4 d % d ", a, b, c);
}
}
}
The main ()
{
int x;
X=f2 ();
Printf (" % d ", x);
}
The running results of how a 101
Someone help me find the problem?
CodePudding user response:
Called function f2 you already have the printf () output, in the main function does not need to printf (" % d ", x); You so that the output is a f (2) the function return value,, but you did not even write return, so 101 should be a random value,CodePudding user response:
What are you doing to write this?Printf (" % d ", x);
CodePudding user response:
That is 101 x