C语言初学 使用while语句统计输入字符个数

#include<stdio.h>

main()

{

int n=0;

printf("输入任意个数的字符: ");

while(getchar()!=' ')n++;

printf("%d",n);

}

原文地址:https://www.cnblogs.com/lj-1568/p/4387182.html