Q:

We can revise the previous program to only print lines that are not empty

0

We can revise the previous program to only print lines that are not empty.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

// read input a line at a time and discard blank lines
while (getline(cin, line))
if (!line.empty())
cout << line << endl;

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now