主页
Python
Python math.ceil() 方法
demo_ref_math_ceil
运行 ❯
×
更改方向
保存代码
更改主题
#Import math library import math #Round a number upward to its nearest integer print(math.ceil(1.4)) print(math.ceil(5.3)) print(math.ceil(-5.3)) print(math.ceil(22.6)) print(math.ceil(10.0))
2
6
-5
23
10