Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
61148 黎瑾萱 字符类型 C++ Compile Error 0 MS 0 KB 391 2023-12-02 16:44:14

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ char n; cin>>n; if(n=='A'||n=='E'||n=='I'||n=='O'||n=='U'){ cout<<"Upper Vowel"; } else{ cout<<"Upper Letter"; } else if(n=='a'||n=='e'||n=='i'||n=='o'||n=='u'){ cout<<"Lower Vowel"; } else{ cout<<"Lower Letter"; } else if(n>=0&&n<=9){ cout"Digit"; } else{ cout<<"Other"; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:12:2: error: 'else' without a previous 'if'
  else if(n=='a'||n=='e'||n=='i'||n=='o'||n=='u'){
  ^
Main.cc:18:2: error: 'else' without a previous 'if'
  else if(n>=0&&n<=9){
  ^
Main.cc:19:7: error: expected ';' before string constant
   cout"Digit";
       ^
Main.cc:19:14: warning: statement has no effect [-Wunused-value]
   cout"Digit";
              ^