diff --git a/ch05/ex5_21.cpp b/ch05/ex5_21.cpp index 3f2767fd..11849203 100644 --- a/ch05/ex5_21.cpp +++ b/ch05/ex5_21.cpp @@ -7,7 +7,11 @@ int main() { string read, tmp; while (cin >> read) - if (!isupper(read[0])) continue; + if (!isupper(read[0])) + { + tmp = read; + continue; + } else if (read == tmp) break; else tmp = read;