Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
78122 sh25_shengmy 简单计算器 C++ Accepted 0 MS 244 KB 436 2025-12-26 15:23:39

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main() { int a,b; char c; cin>>a>>b>>c; if(c=='+'){ cout<<a+b; }else if(c=='-'){ cout<<a-b; }else if(c=='*'){ cout<<a*b; }else if(c=='/'){ if(b==0){ cout<<"Divided by zero!"; }else{ cout<<a/b; } }else{ cout<<"Invaild operator!"; } return 0; }


Judgement Protocol: