| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 156523 | 熊泊彧 | 输出成绩等级II | C++ | Compile Error | 0 MS | 0 KB | 252 | 2026-06-28 15:18:39 |
#include<bits/stdc++.h> using namespace std; int main(){ int a,; cin>>a; switch(a) { case a>=90:cout<<'A';break; case a>=70:cout<<'B';break; case a>=60:cout<<'C';break; case 60>=a:cout<<'D';break; } return 0; }
Main.cc: In function 'int main()':
Main.cc:4:8: error: expected unqualified-id before ';' token
int a,;
^
Main.cc:8:14: error: the value of 'a' is not usable in a constant expression
case a>=90:cout<<'A';break;
^
Main.cc:4:6: note: 'int a' is not const
int a,;
^
Main.cc:8:14: error: the value of 'a' is not usable in a constant expression
case a>=90:cout<<'A';break;
^
Main.cc:4:6: note: 'int a' is not const
int a,;
^
Main.cc:9:14: error: the value of 'a' is not usable in a constant expression
case a>=70:cout<<'B';break;
^
Main.cc:4:6: note: 'int a' is not const
int a,;
^
Main.cc:9:14: error: the value of 'a' is not usable in a constant expression
case a>=70:cout<<'B';break;
^
Main.cc:4:6: note: 'int a' is not const
int a,;
^
Main.cc:10:14: error: the value of 'a' is not usable in a constant expression
case a>=60:cout<<'C';break;
^
Main.cc:4:6: note: 'int a' is not const
int a,;
^
Main.cc:10:14: error: the value of 'a' is not usable in a constant expression
case a>=60:cout<<'C';break;
^
Main.cc:4:6: note: 'int a' is not const
int a,;
^
Main.cc:11:15: error: the value of 'a' is not usable in a constant expression
case 60>=a:cout<<'D';break;
^
Main.cc:4:6: note: 'int a' is not const
int a,;
^
Main.cc:11:15: error: the value of 'a' is not usable in a constant expression
case 60>=a:cout<<'D';break;
^
Main.cc:4:6: note: 'int a' is not const
int a,;
^