-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3.22.cpp
More file actions
28 lines (25 loc) · 663 Bytes
/
3.22.cpp
File metadata and controls
28 lines (25 loc) · 663 Bytes
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
#include <vector>
#include <string>
#include <iterator>
#include <iostream>
#include <cctype>
using std::vector;
using std::string;
using std::cout;
using std::endl;
int main() {
vector<string> text;
for (unsigned cnt = 0; cnt != 15; ++cnt) {
text.push_back("Asdfghjk asdfghjk, asdfghjk asdfghjk. Asdfghjk asdfghjk.");
text.push_back("");
}
for (vector<string>::iterator it = text.begin(); it != text.end() && !it->empty(); ++it) {
for (string::iterator ci = it->begin(); ci != it->end(); ++ci) {
*ci = toupper(*ci);
}
}
for (vector<string>::const_iterator it = text.cbegin(); it != text.cend(); ++it) {
cout << *it << endl;
}
return 0;
}