#include<stdio.h>
void main()
{
char string[3][81];
int
i,j;
char c;
int num[5]={0,0,0,0,0};
gets(string);/*warning C4047: 'function' : 'char *' differs in levels of indirection from 'char [3][81]'
D:\C语言\胡楠\as.c(9) : warning C4024: 'gets' : different types for formal and actual parameter 1这怎么有警告错哪了能不能讲一下*/
for(i=0;i<3;i++)
for(j=0;(c=string[i][j])!='\0';j++)
if(c>='A'&&c<='Z')
num[0]++;
else if(c>='a'&&c<='z')
num[1]++;
else if(c>='0'&&c<='9')/*else if(c>=0&&c<=9)该加单引号*/
num[2]++;
else if(c==' ')
num[3]++;
else num[4]++;
for(i=0;i<5;i++)
printf("num[%d]=%d\n",i+1,num[i]);/*应该加"\n"更好点*/
}