Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
5420 | 詹梓涵 | 09判断ASCLL码 | C++ | Compile Error | 0 MS | 0 KB | 376 | 2024-11-16 09:51:53 |
#include<iostream> // cin\cout\endl using namespace std; int main(){ char c; cin>>c; if(c>="A"&&c<="Z"){ cout<<"Upper Letter"<<endl; } else{ if(c>="a"&&c<="z"){ cout<<"Lower Letter" } else{ if(c>=0&&c<=9){ cout<<"Digital" } else{ cout<<"other" } } } return 0; }
Main.cc: In function 'int main()': Main.cc:6:11: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(c>="A"&&c<="Z"){ ^ Main.cc:6:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] Main.cc:6:19: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(c>="A"&&c<="Z"){ ^ Main.cc:6:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] Main.cc:10:11: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(c>="a"&&c<="z"){ ^ Main.cc:10:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] Main.cc:10:19: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(c>="a"&&c<="z"){ ^ Main.cc:10:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] Main.cc:12:5: error: expected ';' before '}' token } ^ Main.cc:16:5: error: expected ';' before '}' token } ^ Main.cc:19:5: error: expected ';' before '}' token } ^