0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-24 03:31:59 +00:00

B2016 浮点数向零舍入

R53276525
This commit is contained in:
Baoshuo Ren 2021-07-16 11:16:13 +08:00 committed by Baoshuo Ren
parent 3bf4920268
commit 21e710ff01
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

View File

@ -0,0 +1,10 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
double x;
cin >> x;
cout << fixed << setprecision(0) << (x < 0 ? ceil(x) : floor(x)) << endl;
return 0;
}