题解
2025-01-05 12:37:59
发布于:江苏
3阅读
0回复
0点赞
#include<iostream>
#include<cmath>
using namespace std;
int main(){
string s;
double n;
cin>>s>>n;
if(s=="ceil"){
cout<<ceil(n);
}else if(s=="floor"){
cout<<floor(n);
}else if(s=="round"){
cout<<round(n);
}
return 0;
}
#include<iostream>
#include<cmath>
using namespace std;
int main(){
string s;
double n;
cin>>s>>n;
if(s=="ceil"){
cout<<ceil(n);
}
if(s=="floor"){
cout<<floor(n);
}
if(s=="round"){
cout<<round(n);
}
return 0;
}
这里空空如也
有帮助,赞一个