Gravatar
不知所云
积分:29
提交:12 / 134
#include<bits/stdc++.h>
using namespace std;
int main()
{
freopen("jisuan.in","r",stdin);
freopen("jisuan.out","w",stdout);
double a,b;
char op;
cin>>op>>a>>b;
switch(op)
{
case'+':cout<<fixed<<setprecision(2)<<a+b;break;
case'-':cout<<fixed<<setprecision(2)<<a-b;break;
case'*':cout<<fixed<<setprecision(2)<<a*b;break;
case'/':cout<<fixed<<setprecision(2)<<a/b;break;
}
return 0;
}

题目 3981 ktt
2024-06-04 19:41:02
Gravatar
darkMoon
积分:826
提交:65 / 180
https://www.cnblogs.com/cndarkmoon/articles/18216427
博客,快点赞

题目 3981 ktt
2024-05-28 19:56:47