连续读入多个单词,然后统计这些单词的总的长度、以及单词个数。直到输入结束:(按下Ctrl +z, 就会输入一个特殊的字符:文件结束符EOF)分别使用C和C++实现。
摘要:
C++版本 #include <iostream> #include <string> #include <Windows.h> using namespace std; int main(void) { string word; int count = 0; int length = 0; cou 阅读全文
posted @ 2022-10-13 16:16 会飞的鱼-blog 阅读(30) 评论(0) 推荐(0)
浙公网安备 33010602011771号