C語言統計從鍵盤輸入一行字符的個數。
#include main(){ int n=0; printf("input a string:\n"); while(getchar()!='\n') n++; printf("%d",n);}