编写一个程序计算从键盘输入的字符串的字符数
编写一个程序计算从键盘输入的字符串的字符数
1条回答 默认 最新
forget hurt 2021-12-08 17:51关注#include<stdio.h> int main(void) { char ch; int count=0; while((ch=getchar())!='\n') { count++; } printf("%d",count); return 0; }本回答被题主选为最佳回答 , 对您是否有帮助呢?评论 打赏 举报解决 1无用 1