The third part of this book concludes with several tasks concerning conditional execution that may be considered advanced. First you will study the conditional operator, then you will write a program containing several complex conditions, and finally you will learn about an important maxim: when you want to test something, you must be sure it exists.
Conditional Operator
In many cases, the if-else construction can be replaced with the conditional operator, which results in one of the two values depending on whether a condition is or is not fulfilled. If you ...