Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string words;
- int sum = 0;
- cout << "Вводите слова (для завершения введите done)" << endl;
- getline(cin, words);
- while (words != "done")
- {
- getline(cin, words);
- }
- sum = words.size();
- cout << "\nВы ввели " << sum << " символов";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement