高斯神


私信TA

用户名:uq_91578854149

访问量:398

签 名:

加油

等  级
排  名 2371
经  验 2239
参赛次数 2
文章发表 11
年  龄 18
在职情况 学生
学  校
专  业

  自我简介:

TA的其他文章

#include

int number(char c) {

int letter=0,number=0,kong=0,other=0;

while((c=getchar())!='\n'){

if((c>='a'&&c

else if(c>='0'&&c<='9')                  number++;

else if(c==' ')                           kong++;

else                                     other++;

}

printf("%d %d %d %d",letter,number,kong,other);

return 0;

}

int main(){

char c;

    c=getchar();

    number(c);

}

是因为在int main部分上多写getchar(),就在number函数接受char c字符是总会是你从键盘输入的第一个字符类型减-1

 

0.0分

1 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答

代码解释器

  评论区