Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
106132 | 陈奕涵 | 09输出成绩等级 | C++ | Compile Error | 0 MS | 0 KB | 512 | 2025-01-15 14:23:43 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a; cin>>a; if(a>=90){ cout<<"A"; }else if(80<=a<90){ cout<<"B"; }else if(70<=a<80){ cout<<"C"; }else if(60<=a<70){ cout<<"D"; }else if(a<60){ cout<<"E" } return 0; }
Main.cc: In function 'int main()': Main.cc:12:19: warning: comparison of constant '90' with boolean expression is always true [-Wbool-compare] }else if(80<=a<90){ ^ Main.cc:12:16: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] }else if(80<=a<90){ ^ Main.cc:14:19: warning: comparison of constant '80' with boolean expression is always true [-Wbool-compare] }else if(70<=a<80){ ^ Main.cc:14:16: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] }else if(70<=a<80){ ^ Main.cc:16:19: warning: comparison of constant '70' with boolean expression is always true [-Wbool-compare] }else if(60<=a<70){ ^ Main.cc:16:16: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] }else if(60<=a<70){ ^ Main.cc:20:5: error: expected ';' before '}' token } ^