头文件:#include <cmath>
double floor (double x); 向下取证
double ceil (double x); 向上取证 </cmath>
#include <cmath> #include <iostream> using namespace std; int main() { double num; cin >> num; int floor_num = floor(num); int ceil_num = ceil(num); cout << floor_num << endl; cout << ceil_num << endl; return 0; }