diff --git a/ch05/ex5_21.cpp b/ch05/ex5_21.cpp index 18ac982e..aed05033 100644 --- a/ch05/ex5_21.cpp +++ b/ch05/ex5_21.cpp @@ -27,7 +27,7 @@ int main() while (cin >> curr) { if (!isupper(curr[0])) continue; - else if (prev == curr) { + if (prev == curr) { cout << curr << " occurs twice in succession." << endl; no_twice = true; break;