C语言考试练习题_单词统计

Time Limit
1s
Memory Limit
32768KB
Judge Program
Standard
Ratio(Solve/Submit)
44.38%(881/1985)
Description:

从键盘输入一行字符,统计其中单词的个数,各单词以空格分隔,且空格数可以是多个。

Input:

输入只有一行句子。仅有空格和英文字母构成。

Output:

单词的个数。

Sample Input:
stable marriage  problem Consists     of Matching members 
Sample Output:
7
Source:

信息学院07&08学年第二学期C语言上机考试


Submit