| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 139278 | 向睿杰 | 09输出成绩等级 | C++ | Compile Error | 0 MS | 0 KB | 344 | 2025-12-06 11:57:45 |
#include<iostream> using namespace stdi; int main() { int score; cin>>score; if(score>='90'){ cout<<"A"<<endl; } else if('80'<=score<'90'){ cout<<"B"<<endl; } else if('70'<=score<'80'){ cout<<"C"<<endl; } else if(score>='60'){ cout<<"D"<<endl; } else{ cout<<"不及格"<<endl; } return 0; }
Main.cc:7:12: warning: multi-character character constant [-Wmultichar]
if(score>='90'){
^
Main.cc:10:10: warning: multi-character character constant [-Wmultichar]
else if('80'<=score<'90'){
^
Main.cc:10:22: warning: multi-character character constant [-Wmultichar]
else if('80'<=score<'90'){
^
Main.cc:13:10: warning: multi-character character constant [-Wmultichar]
else if('70'<=score<'80'){
^
Main.cc:13:22: warning: multi-character character constant [-Wmultichar]
else if('70'<=score<'80'){
^
Main.cc:16:17: warning: multi-character character constant [-Wmultichar]
else if(score>='60'){
^
Main.cc:2:17: error: 'stdi' is not a namespace-name
using namespace stdi;
^
Main.cc:2:21: error: expected namespace-name before ';' token
using namespace stdi;
^
Main.cc: In function 'int main()':
Main.cc:6:2: error: 'cin' was not declared in this scope
cin>>score;
^
Main.cc:6:2: 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:3: error: 'cout' was not declared in this scope
cout<<"A"<& __os)
^
Main.cc:10:21: warning: comparison of constant '14640' with boolean expression is always true [-Wbool-compare]
else if('80'<=score<'90'){
^
Main.cc:10:14: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
else if('80'<=score<'90'){
^
Main.cc:11:6: error: 'cout' was not declared in this scope
cout<<"B"<& __os)
^
Main.cc:13:21: warning: comparison of constant '14384' with boolean expression is always true [-Wbool-compare]
else if('70'<=score<'80'){
^
Main.cc:13:14: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
else if('70'<=score<'80'){
^
Main.cc:14:6: error: 'cout' was not declared in this scope
cout<<"C"<& __os)
^
Main.cc:17:6: error: 'cout' was not declared in this scope
cout<<"D"<& __os)
^
Main.cc:20:3: error: 'cout' was not declared in this scope
cout<<"不及格"<& __os)
^