#include <string>
#include <iostream>
usingnamespace std;
int main()
{
string words, word2;
cout << "Input exactly one word on each row.\nEnd your input with the word done" << endl;
while(words != "Done" && words != "done")
{
cin >> words;
word2 +=words;
word2 += " ";
}
cout << word2 << endl;
}
You see, I don't wanna have the word "Done" in my output string in the end of the program. Dunno really how do solve this problem.
Can someone give me a tip?