Find the errors in the following code segments and explain how to correct them.

```
unsigned int n{1};
while (n < 10) {
cout << n++ << endl;
}
```

ANS: Error: Improper relational operator used in the loop-continuation condition.
Correction: Use <= rather than <, or change 10 to 11.

Computer Science & Information Technology

You might also like to view...

Does touch differ at all inside of Office 2013? Explain. How could you use a tablet PCwithouta keyboard? How could you use a tablet PC without a touch screen?

What will be an ideal response?

Computer Science & Information Technology

When using the white balance on the Three-Way Color Corrector, what should you be clicking?

What will be an ideal response?

Computer Science & Information Technology