Skip to content

Instantly share code, notes, and snippets.

@vlad-shatskyi
Created January 5, 2012 16:01
Show Gist options
  • Save vlad-shatskyi/1565858 to your computer and use it in GitHub Desktop.
Save vlad-shatskyi/1565858 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
vector<string> text;
string word;
while (cin >> word) {
text.push_back(word);
}
for (vector<string>::size_type word_counter = 0; word_counter != text.size(); ++word_counter) {
// С каждым словом
word = text[word_counter];
for (string::size_type let_counter = 0; let_counter != word.size(); ++let_counter) {
word[let_counter] = toupper(word[let_counter]);
}
text[word_counter] = word;
}
unsigned i = 0;
for (vector<string>::size_type w = 0; w != text.size(); ++w) {
if (i != 7) {
cout << text[w] << ' ';
++i;
}
else{
cout << text[w] << endl;
i = 0;
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment