Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
7418 | 刘芃伽 | 字符类型 | C++ | Wrong Answer | 2 MS | 260 KB | 811 | 2025-04-26 09:26:50 |
#include<bits/stdc++.h> using namespace std; int main(){ //判断字符类型 char a; cin>>a; //1.判断字符类型的函数: //isalpha(a):判断字符是否为字母 //isupper(a)判断字符是否为大写字母 //islower(a)判断字符是否为小写字母 //isdigit(a)判断字符是否为数字 if(isalpha(a)){ if(a='A'||'E'||'I'||'O'||'U'){ cout<<"Upper Vowel"; } else{ cout<<"Upper Letter"; } } else if(islower(a)){ if(a='a'||'e'||'i'||'o'||'u'){ cout<<"Lower Vowel"; } else{ cout<<"Lower Letter"; } } else if(isdigit(a)){ cout<<"Digit"; } else{ cout<<"Other"; } return 0; }
------Input------
b
------Answer-----
Lower Letter
------Your output-----
Upper Vowel