Description
输入一个字符,判断字符的类型,即字母(alpha)、数字(numeric)和其它字符(other)。
Input
一个字符。
Output
字符的类型,alpha、numeric或other。
Sample Input
A
Sample Output
alpha
#include<stdio.h>
int main()
{
char x;
scanf("%c",&x);
if(x>=65&&x<=122)
printf("alpha\n");
else if(48<=a&&a<=57)
printf("numeric\n");
else if(0<=a&&a<=255)
printf("other\n");
return(0);
}
该篇博客介绍如何使用C语言判断输入字符是字母、数字还是其他类型,提供了示例输入和输出。

918

被折叠的 条评论
为什么被折叠?



