blob: 488d85d2c7e2b9d2ab5dfb31d48cac252a32fe52 (
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
|
#include <iostream>
#include <vector>
#include "sales_data.hpp"
#include "sales_item.hpp"
/*
*
* 3.22
*
* I'll be honest. I actually have no idea what i was supposed to do in this exercise.
* So i just made it so the program toupper's all the strings until a blank string is encountered
* Everything after the blank string is not processed or printed.
*/
using std::string;
using std::cout;
using std::cin;
using std::cerr;
using std::clog;
using std::endl;
using std::vector;
int main () {
vector<string> text;
string s1;
while(getline(cin, s1)) {
text.push_back(s1);
}
for(auto vi = text.begin() ; vi != text.end() && !vi->empty() ; vi++) {
for(auto &cc : *vi) {
cc = toupper(cc);
}
}
for (auto it = text.cbegin() ; it != text.cend() && !it->empty() ; ++it) {
cout << *it << endl;
}
return 0;
}
|