主页
C 语言
C Math round() 函数
demo_ref_math_round
运行 ❯
×
更改方向
保存代码
更改主题
#include
#include
int main() { printf("%f\n", round(0.60)); printf("%f\n", round(0.40)); printf("%f\n", round(5)); printf("%f\n", round(5.1)); printf("%f\n", round(-5.1)); printf("%f\n", round(-5.9)); return 0; }
1.000000
0.000000
5.000000
5.000000
-5.000000
-6.000000