求助

B2016 浮点数向零舍入

```cpp #include <bits/stdc++.h> using namespace std; int main(){ double a; cin>>a; cout<<(long long)a; return 0; } ``` @[Curry_Skyfxxker](/user/750706)
by Jackson_Miller @ 2022-07-25 20:43:25


其实不需要那么麻烦,无需if语句,只需: ``` #include<bits/stdc++.h> using namespace std; int main() { double a;//float a也可以 cin>>a;//输入 cout<<(long long)a<<endl;//输出 return 0;//结束 } ```
by cyh0412 @ 2022-07-25 20:45:30


|