Problem

1/9

清单:开始

Theory Click to read/hide

Error

Problem

构建alphabetic-frequency dictionary:按字母顺序排列的单词列表,每个单词的右侧应指示它在源文件中出现的次数。文本结束的标志是“END!”。单词的打印顺序无关紧要。
  <正文>
输入 输出
多吃些软软的法式面包,END! 吃1个
还有1个
这些 1
软 1
法语 1
滚1
Write the program below
#include<iostream>
#include<map>
#include<string>
using namespace std;


int main()
{

	map<string, int> mymap;
	string s;
	while (true)
	{              
	}

	map<string, int>::iterator it;

	for (it = mymap.begin(); it != mymap.end(); ++it)
		cout << it->first << " " << it->second << "\n";
	return 0;
}              

     

Program check result

To check the solution of the problem, you need to register or log in!