分支语句 + 函数初步
2024-09-17 10:47:55
发布于:上海
13阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
    string a;
    cin>>a;
    double b;
    cin>>b;
    if(a=="ceil"){
        cout<<ceil(b);
    }
    else if(a=="floor"){
        cout<<floor(b);
    }
    else{
        cout<<round(b);
    }
    return 0;
}
这里空空如也



有帮助,赞一个