Seld the loop.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 20PE
icon
Related questions
Question

 

Seld the loop. 

 

Make a simple checkbook balancer that would input a sequence of deposits (positive floating-
point values) and issuances (negative floating-point values) terminated by a 0. It would output
the transaction type, the amount and the running balance for each entry. Assume the initial
balance of 0. Ensure that the issued check won't bounce!
For example:
Input Result
1000 Transaction: Deposit
-500
0
Amount entered: 1000.00
Remaining balance: 1000.00
0
Transaction: Issuance
Amount entered: 500.00
Remaining balance: 500.00
1000
-500 Amount entered: 1000.00
-800 Remaining balance: 1000.00
Transaction: Issuance
500
Transaction: Deposit
Amount entered: 500.00
Remaining balance: 500.00
Check will bounce!
Transaction: Deposit
Amount entered: 500.00
Remaining balance: 1000.00
Transcribed Image Text:Make a simple checkbook balancer that would input a sequence of deposits (positive floating- point values) and issuances (negative floating-point values) terminated by a 0. It would output the transaction type, the amount and the running balance for each entry. Assume the initial balance of 0. Ensure that the issued check won't bounce! For example: Input Result 1000 Transaction: Deposit -500 0 Amount entered: 1000.00 Remaining balance: 1000.00 0 Transaction: Issuance Amount entered: 500.00 Remaining balance: 500.00 1000 -500 Amount entered: 1000.00 -800 Remaining balance: 1000.00 Transaction: Issuance 500 Transaction: Deposit Amount entered: 500.00 Remaining balance: 500.00 Check will bounce! Transaction: Deposit Amount entered: 500.00 Remaining balance: 1000.00
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Basics of loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage