blob: 3636e65e7db3afb966716007321f0d96ba69bea2 (
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
|
#include <iostream>
#include <vector>
#include <cctype>
/*
*
* 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;
}
|