Please enter the clothing price: ? 39.95 The tax is: 0.0 The total is: 39.95
Since PRICE >= 100
is false,
the false branch is executed.
The false branch puts 0 in TAX
.
Here is a new story problem: You want to write a program that calculates the weekly pay for one employee. The program should:
Say that Ann has a base rate of $10 per hour and worked 20 hours. Ann is paid: 20 * $10 = $200.
The next week Ann works 50 hours. Now Ann is paid:
Ann will be paid a total of $400 + $150 = $550 for that week.
Bill makes $5 an hour and worked 42 hours in a week. How much is Bill paid? (Work out the answer on some scratch paper.)