November 2001
Beginner
1128 pages
29h 12m
English
In this chapter you learn
Logical operators: &&, ||, and !
The conditional operator: ?:
The continue and break statements
One of the keys to designing intelligent programs is to give them the ability to make decisions. Chapter 5, “Loops and Relational Expressions,” shows you one kind of decision making—looping—in which a program decides whether or not to continue looping. Now you investigate how C++ lets you use branching statements to decide among alternative actions. Which vampire-protection scheme (garlic or cross) should the program use? What menu choice has the user selected? ...
Read now
Unlock full access