go to previous page   go to home page   hear noise   go to next page


Do you want pin stripes (0 or 1)? 1
Do you want anti-lock brakes (0 or 1)? 0
Total cost is: $20250.0

This time, only the first true block was executed.

A Flowchart of the Program

This flowchart shows how the program works: Each true block of an if statement is like a "side-trip" that adds something to the totalCost. Both, neither, or just one side-trip might be taken.

hot wheels


What would happen if the user answered both questions by typing "2" instead of "1" ?