Consider the following code fragment: int line = 0; char ch; while (cin.get(ch)) { if (ch ==

Question:

Consider the following code fragment:
int line = 0;
char ch;
while (cin.get(ch))
{
if (ch == 'Q')
break;
if (ch != '\n')
continue;
line++;
}
Rewrite this code without using break or continue.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

C++ Primer Plus

ISBN: 9780321776402

6th Edition

Authors: Stephen Prata

Question Posted: