diff options
Diffstat (limited to '3p17.cpp')
-rw-r--r-- | 3p17.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/3p17.cpp b/3p17.cpp new file mode 100644 index 0000000..a2195c7 --- /dev/null +++ b/3p17.cpp @@ -0,0 +1,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; +} |