SOJ.Letters and Words

来源:互联网 发布:java基础测试题及答案 编辑:程序博客网 时间:2024/06/05 23:02
                                                                                Letters and Words
     
时间限制:1秒    内存限制:256兆
题目描述

Calculate the number of letters (including white spaces but excluding line breaks) and the number of words in the given paragraph. 

The input consists of only alphabets and white spaces.

样例输入
Hello world Welcome to SYSUa a  a
样例输出
Letters: 33Words: 8
提示

Use cin.get() to read the paragraph. 

Use istringstream strm(string) to obtain a string stream. The string stream can help you to read all string blocks in a simple way.

没什么好介绍的,一道作业题。





0 0
原创粉丝点击