Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
77546 sh25_zhangjiajia 简单计算器 C++ 编译错误 0 MS 0 KB 494 2025-12-26 14:25:48

Tests(0/0):


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


测评信息: