Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7419 吴承熹 字符类型 C++ Accepted 0 MS 256 KB 972 2025-04-26 09:27:08

Tests(26/26):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ char a; cin>>a; //isalpha(a):判断字符a是否为字母 //isupper(a):判断字符a是否为大写字母 //islower(a):判断字符a是否为小写字母 //isdigit(a):判断字符a是否为数字 if(isupper(a)){ if(a=='A'||a=='E'||a=='I'||a=='O'||a=='U'){ cout<<"Upper Vowel"; } else{ cout<<"Upper Letter"; } } else if(islower(a)){ if(a=='a'||a=='e'||a=='i'||a=='o'||a=='u'){ cout<<"Lower Vowel"; } else{ cout<<"Lower Letter"; } } else if(isdigit(a)){ cout<<"Digit"; } else{ cout<<"Other"; } return 0; }