Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
97945 | 陈家渝 | 09输出成绩等级 | C++ | Compile Error | 0 MS | 0 KB | 403 | 2024-11-16 21:43:22 |
#include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a; cin>>a; if(a>=90) { cout<<'A'; } elif(a>=80<90) { cout<<'B'; } elif(a>=70<80) { cout<<'C'; } elif(a>=60<70) { cout<<'D'; } elif(a<60) { cout<<'E' } return 0; }
Main.cc: In function 'int main()': Main.cc:5:5: error: 'cin' was not declared in this scope cin>>a; ^ Main.cc:8:9: error: 'cout' was not declared in this scope cout<<'A'; ^ Main.cc:10:15: warning: comparison of constant '90' with boolean expression is always true [-Wbool-compare] elif(a>=80<90) ^ Main.cc:10:11: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] elif(a>=80<90) ^ Main.cc:10:18: error: 'elif' was not declared in this scope elif(a>=80<90) ^ Main.cc:14:15: warning: comparison of constant '80' with boolean expression is always true [-Wbool-compare] elif(a>=70<80) ^ Main.cc:14:11: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] elif(a>=70<80) ^ Main.cc:18:15: warning: comparison of constant '70' with boolean expression is always true [-Wbool-compare] elif(a>=60<70) ^ Main.cc:18:11: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] elif(a>=60<70) ^