请大佬帮我看下哪里出错了,跟小甲鱼打的,编译后无论输入哪个数字都是显示digit
#include <stdio.h>void main()
{
char c;
printf("input character: ");
c=getchar();
if(c<32)
{
printf("This is a control character!");
}
else if(c>='0'&&c<='9')
{
printf("This is a digit\n");
}
else if(c>='A'&&c<='Z')
{
printf("This is a capital letter\n");
}
else if(c>='a'&&c<='z')
{
printf("This is a small letter\n");
}
else
{
printf("This in an other character\n");
}
} 题目是什么啊,输入数字显示digit不很正常吗 你输入数字当然是 digit啊 https://static01.imgkr.com/temp/6d5d2194b3224ebcb8efc282ed825b0f.jpg 抱歉,眼瞎了
.... $ gcc -g -Wall -o main main.c
main.c:3:6: warning: return type of ‘main’ is not ‘int’ [-Wmain]
void main()
^~~~
页:
[1]