你是OP?。?!
#include<iostream>
using namespace std;
int main()
{
float wanghan,yuanshen;
char op;
cin>>wanghan>>yuanshen>>op;
switch(op)
{
case'+':cout<<wanghan+yuanshen<<endl<<"汪C是op"<<endl;break;
case'-':cout<<wanghan-yuanshen<<endl<<"汪C是原批"<<endl;break;
case'*':cout<<wanghan*yuanshen<<endl<<"汪C是超級op"<<endl;break;
case'/':cout<<wanghan/yuanshen<<endl<<"汪C是傘兵op"<<endl;break;
default:cout<<"你是OP!!!!!"<<endl;
}
return 0;
}?
標(biāo)簽: