Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
900 伊隽诚 09判断ASCLL码 C++ Compile Error 0 MS 0 KB 365 2023-05-20 14:46:00

Tests(0/0):


Code:

#include<iostream> using namespace std; int main { #include <iostream> using namespace std; int main(){ char a; cin>>a; if ('A'<=a&&a<='Z'){ cout<<"Upper Letter"<<endl; } else if('a'<=a&&a<='z'){ cout<<"Lower Letter"<<endl; } else if("0"<"9"){ cout<<"Digtal"<<endl;} else{ cout<<"other"<<endl;} return 0; } }


Run Info:

Main.cc:6:1: error: expected primary-expression before 'using'
 using namespace std;
 ^
Main.cc:6:1: error: expected '}' before 'using'
Main.cc:6:1: error: expected ',' or ';' before 'using'
Main.cc: In function 'int main()':
Main.cc:7:10: error: 'int main()' redeclared as different kind of symbol
 int main(){
          ^
Main.cc:3:5: error: previous declaration of 'int main'
 int main
     ^
Main.cc:17:14: warning: comparison with string literal results in unspecified behaviour [-Waddress]
  else if("0"<"9"){
              ^
Main.cc: At global scope:
Main.cc:23:1: error: expected declaration before '}' token
 }
 ^