Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
81307 刘泽熙 字符类型 C++ Compile Error 0 MS 0 KB 547 2024-07-12 11:32:26

Tests(0/0):


Code:

#include <bits/stdc++.h> using namespace std; int main() { char app; cin >> app; if (app == 'a' || 'e' || 'i' || 'o' || 'u') { cout << "Lower Vowel"; }else{ cout<<"Lower Letter"; } if(app=='A'||'E'||'I'||'O'||'U'){ cout<<"Upper Letter" }else{ cout<<"Upper Letter"; } if(app=='1'||'2'||'3'||'4'||'5'||'6'||'7'||'8'||'9'){ cout<<"Digit"; } if(app != 'a' || 'e' || 'i' || 'o' || 'u'&&app!='1'||'2'||'3'||'4'||'5'||'6'||'7'||'8'||'9'&&app!='1'||'2'||'3'||'4'||'5'||'6'||'7'||'8'||'9'){ cout<<"Other"; } }


Run Info:

Main.cc: In function 'int main()':
Main.cc:14:2: error: expected ';' before '}' token
  }else{
  ^
Main.cc:20:43: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  if(app != 'a' || 'e' || 'i' || 'o' || 'u'&&app!='1'||'2'||'3'||'4'||'5'||'6'||'7'||'8'||'9'&&app!='1'||'2'||'3'||'4'||'5'||'6'||'7'||'8'||'9'){
                                           ^
Main.cc:20:93: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  if(app != 'a' || 'e' || 'i' || 'o' || 'u'&&app!='1'||'2'||'3'||'4'||'5'||'6'||'7'||'8'||'9'&&app!='1'||'2'||'3'||'4'||'5'||'6'||'7'||'8'||'9'){
                                                                                             ^