For example:
b=a+c+0.5
Principle: If a+c = 10. 18860.8886868666 17
So a+c+0.5= 10.99999999, is it int or b= 10?
And:
Integer divided, 5/3 =1;
Remainder 5% 3 = 2;
When rounding is needed, you should use double precision or floating-point number to calculate and then judge whether it is true or not, and give a simple:
Floating a;
int b;
If (a-0.5 >; = a/ 1)b = a/ 1+ 1;
else b = a/ 1;