October 2011
Beginner to intermediate
1200 pages
35h 33m
English
In this chapter you’ll learn about the following:
• The if statement
• The if else statement
• Logical operators: &&, ||, and !
• The cctype library of character functions
• The conditional operator: ?:
• The switch statement
• The continue and break statements
• Number-reading loops
• Basic file input/output
One of the keys to designing intelligent programs is to give them the ability to make decisions. Chapter 5, “Loops and Relational Expressions,” shows one kind of decision making—looping—in which a program decides whether to continue looping. This chapter investigates how C++ lets you use branching statements to decide among alternative actions. Which vampire-protection scheme (garlic or cross) ...
Read now
Unlock full access