Sle*_*lee 69 objective-c
我有2个int.我如何将一个接一个地分开然后再向上舍入?
How*_*ard 202
如果你的整数是A和B你想要ceil(A/B)只是计算(A+B-1)/B.
A
B
(A+B-1)/B
kra*_*g22 36
关于什么:
float A,B; // this variables have to be floats! int result = floor(A/B); // rounded down int result = ceil(A/B); // rounded up
归档时间:
15 年,7 月 前
查看次数:
37030 次
最近记录:
8 年,9 月 前