Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - On the calculation of integer variables ... rookie level ...
On the calculation of integer variables ... rookie level ...
The first one should be right. Division should take precedence over remainder.

int(a+c)= 7;

But I think we should first calculate 3 * (int) (a+b) = 21; b/2 1 = 0; 0/2=0; (int)(0)= 0; 0%4=0; The answer is 2.5. Priority should be */%. Follow the principle from left to right.

a+c = 7.2; Rounded by int, it is 7, multiplied by 3, divided by b, and finally divided by 2.

Personally, I think there is no problem.