3725 - C++字符串作业3:编写函数计算一段英文中的单词个数
Time Limit : 1 秒
Memory Limit : 128 MB
编写函数计算一段英文中的单词个数.
Input
一段最长500个字母的英文句子,不包含数字和特殊字符,但可能包含一些英文标点符号(例如,.?!)。标点符号独立出现时不视为一个单词。
Output
包含的单词个数
Examples
Input Format
How do you do?Nice to meet you!We hope everyone watches them with warmth.
Output Format
15
Hint
定义字符串char s[501];输入时用cin.getline(s,500).