#include <iostream> #include <cmath>//头文件 using namespace std; int main () { double n; cin>>n; cout<<ceil(n)<<endl;//天花板:向上取整 cout<<round(n)<<endl;//周围:四舍五入 cout<<floor(n)<<endl;//地板:向下取整 return 0; }
#include <iostream> #include <cmath>//头文件 using namespace std; int main () { double n; cin>>n; cout<<ceil(n)<<endl;//天花板:向上取整 cout<<round(n)<<endl;//周围:四舍五入 cout<<floor(n)<<endl;//地板:向下取整 return 0; }