GIP 7

#include <iostream>
#include <string>
 
using namespace std;
 
int main(void)
{
	string text;
	int b[20]={0};
 
	cout << "Text = ? ";
	getline(cin, text);
 
	int iz;
	for(int i=0; i < 20; i++)
	{
		if(text[i] == ' ')
		{
			b[iz]++;
			iz=0;
		}
		cout << text[i] << endl;
	}
	// b[iz]++;
 
	for(int i=0; i < 20; i++)
	{
		if(b[i] > 0)
		{
			cout << endl << i << " ";
			for(int ii=0; b[i] > ii; ii++)
				cout << "#";
		}
	}
	return 0;
}