# 写出一个程序,接受一个正浮点数值,输出该数值的近似整数值。如果小数点后数值大于等于0.5,向上取整;小于0.5, 则向下取整。标签:python,笔试,0.5,数值,近似值,num,取整 From: https://www.cnblogs.com/xiaocai84/p/17624358.html
# 保证输入的数字在32位浮点数范围内
num = input("请输入一个正数:")
print(int(float(num)+0.5))
# 写出一个程序,接受一个正浮点数值,输出该数值的近似整数值。如果小数点后数值大于等于0.5,向上取整;小于0.5, 则向下取整。标签:python,笔试,0.5,数值,近似值,num,取整 From: https://www.cnblogs.com/xiaocai84/p/17624358.html
# 保证输入的数字在32位浮点数范围内
num = input("请输入一个正数:")
print(int(float(num)+0.5))