Chapter 5. Decision and Loop Statements
After completing this chapter, you will be able to:
Make decisions by using the if statement.
Make multiway decisions by using the switch statement.
Perform loops by using the while, for, and do-while statements.
Perform unconditional jumps in a loop by using the break and continue statements.
All high-level languages provide keywords with which you can make decisions and perform loops. C++ is no exception. C++ provides the if statement and the switch statement for making decisions, and it provides the while, for, and do-while statements for performing loops. In addition, C++ provides the break statement to exit a loop immediately and the continue statement to return to the start of the loop for the next iteration. ...
Get Microsoft Visual C++/CLI Step by Step now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.