三行字符统计????数组
main (){
char a[3][80],ch;
int dletter[3]={0},xletter[3]={0},space[3]={0},digtal[3]={0},others[3]={0},i,j;
for(i=0;i<=2;i++)
{gets(a[i][80]);
for(j=0;(ch=a[i][j])!='\0';i++)
{
if (ch>='a'&&ch<='z')
xletter[i]++;
if (ch>'A'&&ch<='Z')
dletter[i]++;
if(ch==' ')
space[i]++;
if (ch<='9'&&ch>='0')
digtal[i]++;
else others[i]++;
}
}
for (i=0;i<=2;i++)
{printf("%-2d",dletter[i]);
printf("%-2d",xletter[i]);
printf("%-2d",space[i]);
printf("%-2d",digtal[i]);
printf("%-2d",others[i]);
}
}
这个有什么问题啊 我的意思是想统计三行字符 每行不过80个字符!!!
??????