Run ID:7418
提交时间: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; }