Question: CSE 1284 Functions, Conditions, and Loops Test 2, Programming Portion Objective: Test your knowledge of functions, conditions, and loops Scenario: You have a program that

 CSE 1284 Functions, Conditions, and Loops Test 2, Programming Portion Objective:Test your knowledge of functions, conditions, and loops Scenario: You have aprogram that can take in charges until the user chooses to quit

CSE 1284 Functions, Conditions, and Loops Test 2, Programming Portion Objective: Test your knowledge of functions, conditions, and loops Scenario: You have a program that can take in charges until the user chooses to quit (on a -1 input); the program calculates the running total as charges are entered. Once the charges are complete, the program will then ask for a series of payments until the charges are completely paid off. If there is any change leftover, the program will display that. Otherwise, the program should tell the user they have no change and exit. Two sample executions are listed below Enter your charges. To end the charges calculator, enter -1. Charge 1: 0.56 Charge 2: 0.44 Charge 3: -1 Your total is $1.00 Enter your payments on the charges until you've paid them off Payment 1: 1.00 Remaining: $0.00 You paid off your charges with no change leftover. RESTART: /home/kort/MEGA/teaching fall2018/1284/Tests/Tes Enter your charges. To end the charges calculator, enter -1 Charge1 10.34 Charge 2: -1 Your total is $10.34 Enter your payments on the charges until you've paid them off. Payment 1: 5.00 Remaining: $5.34 Payment 2: 6.56 Remaining: $-1.22 Change: $1.22

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!