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:
parent
3bf4920268
commit
21e710ff01
10
Luogu/problem/B2016/B2016.cpp
Normal file
10
Luogu/problem/B2016/B2016.cpp
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user