Up to this point the behaviour of your programs has been very predictable. The programs have been simply a sequence of statements that is executed in a strict order from the top of the program to the bottom. While you have been able to accept input values from your users all you have been able to do is use these values in calculations. You have not been able to use them as the basis of decisions. More complex programs take values from the user and will behave differently depending on the values that are entered. This chapter is about writing programs that do just that; they take values, test conditions, and then behave differently depending on the results.
Unable to display preview. Download preview PDF.