输入一段字符,求里面字母,数字,空格,和其他字符;运行不了,看不出问题 求解

#include<stdio.h>

int main()

{ int i,a=0,b=0,c=0,d=0,e,f;

char s1[i]; 

scanf("%s",&s1[i]);

gets(s1);

for(i=0;s1[i]!='/0';i++)

{

if('A'<=s1[i]&&s1[i]<='Z'||'a'<=s1[i]&&s1[i]<='z')

{a=a++;}

if('0'<=s1[i]<='9')

{b=b++;}

if(s1[i]==' ')

{c=c++;}

}

printf("%d %d %d",a,b,c);


 }


qq_LeeMeYang_0
浏览 1291回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP