文章

11

粉丝

407

获赞

1

访问

111.6k

头像
复数
备考心情
发布于2020年5月1日 16:06
阅读数 9.0k

#include <bits/stdc++.h>
using namespace std;
int main(){
    double a,b,c,d;
    char e;
    cin>>a>>b>>c>>d>>e;
    if(e=='+')
        cout<<fixed<<setprecision(1)<<a+c<<" "<<b+d<<endl;
    if(e=='*')
        cout<<fixed<<setprecision(1)<<a*c-b*d<<" "<<b*c+a*d<<endl;
}

//cout<<fixed<<set[recision(n)<<3.14156<<endl;输出结果保留n位小数

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发