//alphabet 英文字母 ,blank 空格,數字 digit#include <stdio.h>int main(){ char c; int alphabet=0,blank=0,digit=0,other=0; printf("請輸入一行字符:\n ...
題目:輸入一行字符,分別統計出其中英文字母、空格、數字和其它字符的個數。 ...
getchar()函數的作用是從計算機終端(一般為鍵盤)獲取一個無符號字符。getchar()函數只能接收一個字符,其函數值就是從輸入設備獲取到的字符。 該函數聲明在stdio.h頭文件中,使用的時候要包含stdio.h頭文件。 如: #include<stdio.h> ...