Gravatar
不知所云
积分:35
提交:15 / 141
#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
积分:932
提交:70 / 193
https://www.cnblogs.com/cndarkmoon/articles/18216427
博客,快点赞

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