cin >> "You are very good."
using namespace std;
cin >> s;
while (getline(cin, s))
while (s.find("bad")!= string::npos)
s.replace(s.find("bad"), 3, "good");
cout << s << endl;
cin >> s; before the loop is reading the first word of the line and removing it from the input stream. Then
getline(cin, s) reads the rest of the line. So the first time through the loop,
s is just
are very bad. You then replace
good, and the result is
are very good.
There doesn't seem to be any reason for the
cin >> s; line, so just remove it.