Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
92060 | 蔡佳轩 | 09计算算数表达式 | C++ | Compile Error | 0 MS | 0 KB | 300 | 2024-09-28 10:56:24 |
#include <iostream> using namesapce std; int main(){ int a,b; char op; cin>>a>>op>>b; if(op=='+'){ cout<<a+b; } else if(op=='-'){ cout<<a-b; } else if(op=='*'){ cout<<a*b; } else if(op=='/'){ cout<<a/b; } }
Main.cc:2:7: error: expected nested-name-specifier before 'namesapce' using namesapce std; ^ Main.cc: In function 'int main()': Main.cc:6:5: error: 'cin' was not declared in this scope cin>>a>>op>>b; ^ Main.cc:6:5: note: suggested alternative: In file included from Main.cc:1:0: /usr/include/c++/5/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ Main.cc:8:9: error: 'cout' was not declared in this scope cout<