In This Chapter
Getting used to conditions
Using if, else if, and else
Using switch structures
Working with while and for loops
Using comparison operators
Computer programs make decisions. That's part of what makes them interesting. But all the decisions a computer seems to make were already determined by the programmer. The computer's decision-making power is all based on an idea called a condition. This little gem is an expression that can be evaluated as true or false. (That sounds profound. I wonder if it will be on the mid-term?)
Conditions can be comparisons of one variable to ...