summaryrefslogtreecommitdiff
path: root/3p17.cpp
blob: a2195c78e24522970eb4524a858efce37874b1d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <iostream>
#include <vector>
#include <cctype>
#include "sales_data.hpp"
#include "sales_item.hpp"

/*
 *
 * 3.17
 *
 *
 */

using std::string;
using std::cout;
using std::cin;
using std::cerr;
using std::clog;
using std::endl;
using std::vector;
int main () {

    string word;
	vector<string> v_words;
	while(cin >> word) {
		v_words.push_back(word);		
	}
	
	for(auto &i : v_words) {
		for(auto &c : i) {
			c = toupper(c);
		}
	}

	decltype(v_words.size()) cnt = 0;
	for(auto vww : v_words) {
		if(cnt >= 8) {
			cout << endl;
			cnt = 1;
		} else {
			++cnt;
		}
		cout << vww << " ";
	}

	cout << endl;
	return 0;
}