# include & lt; Stdlib. H>
Int main ()
{
Float a, b, s;
Int c, t;
The scanf (" % f, % d ", & amp; S, & amp; T);
If (s
=3)A=10;
Else if (s> 3 & amp; & S<=10)
A=2 * s + 4;
The else
A=3 * s - 6;
If (t<5)
B=0;
The else
B=t % 5 * 2;
C=(int) (a + b);
Printf (" % d ", c);
Return 0;
}
CodePudding user response:
Don't see any problem? What is wrong?CodePudding user response:
Such as input 12.5 9 will be 34 39 not correct resultsCodePudding user response:
Estimate is said that aB=t % 5 * 2;
The multiplication of higher priority than %, so do the multiplication first
The expression is equivalent to the
B=t % 10
To change the
you have to writeB=(t % 5) * 2;
CodePudding user response:
Fun