Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Creating A Database In Filemaker Pro Visual QuickProject Guide

Authors: Steven A. Schwartz

1st Edition

0321321219, 978-0321321213

More Books

Students also viewed these Databases questions