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

Answer:

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

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 flowchart

QUESTION 12:

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


go to previous page   go to home page   go to next page