Question: Exercise 1 Problem Description: Given a total purchase amount and the age of a shopper, calculate the final payment after the following two possible sales

 Exercise 1 Problem Description: Given a total purchase amount and the
age of a shopper, calculate the final payment after the following two

Exercise 1 Problem Description: Given a total purchase amount and the age of a shopper, calculate the final payment after the following two possible sales deductions: If the total amount is $100 or over, there is a 20% discount of the total price. If the purchaser is 65 or older, there is a 10% discount of the total price. Please use printf to keep two digits after the decimal point for the final amount The following are four sample runs. Enter total amount: Enter total amount: 80 100 Enter age: 40 Enter age: 55 The final amount is $80.00 The final amount is $80.00 Enter total amount: 50 Enter total amount: 200 Enter age: 70 Enter age: 75 The final amount is $45.00 The final amount is $140.00 1. Variables (add more rows if needed): Description Inputs Variable name Outputs II. Conditions that the Program Needs to Exam (add more rows if needed): Description (English or Math) Boolean Expression 1. Variables (add more rows if needed): Description Inputs Variable name Outputs II. Conditions that the Program Needs to Exam (add more rows if needed): Description (English or Math) Boolean Expression III. Exclusiveness and Multi-branch vs Multiple Issue: Can more than one condition above be true at the same time for one execution of the program? (1) Answer Yes or No and (2) state the reason: Answer: If yes, use multiple separate if statement. If no, use one multi-branch if statement

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!