题解 | #取近似值#
取近似值
https://www.nowcoder.com/practice/3ab09737afb645cc82c35d56a5ce802a
#include <iostream>
int main(int argc, char* argv[]){
double num;
std::cin >> num;
int a = num;
double b = num - a;
if(b >= 0.5){
a += 1;
}
std::cout << a << std::endl;
return 0;
}