Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

lab 1 1 : 1 0 pts Pre - Lab: - Design the solution to following problem. You can represent your design using a flow

lab 11: 10pts Pre-Lab: - Design the solution to following problem. You can represent your design using a flow-chart and (or) pseudo-code. Follow the problem-solving approach discussed in the first week of the class. - This is not part of your grade, but it will be extremely helpful to completing this lab. Lab: Problem Solving: Use appropriate loop construct (for, while, or do while) Write a program that calculates the balance of a savings account at the end of a three-month period. It should ask the user for the starting balance and the annual interest rate. A loop should then iterate once for every month in the period, performing the following: A) Ask the user for the total amount deposited into the account during the month. Do not accept negative numbers. This amount should be added to the balance. B) Ask the user for the total amount withdrawn from the account during that month. Do not accept negative numbers or numbers greater than the balance after the deposits for the month have been added in. C) Calculate the interest for that month. The monthly interest rate is the annual interest rate divided by 12. Multiply the monthly interest rate by the average of that month's starting and ending balance to get the interest amount for the month. This amount should be added to the balance. After the last iteration, the program should display a final report that includes the following information. - Starting balance at the beginning of the three-month period - Total deposits (money amount) made during the three-month period - Total withdrawals (money amount) made during the three-month period - Total interest posted to the account during the three monthsPre-Lab:
Design the solution to following problem. You can represent your design
using a flow-chart and (or) pseudo-code. Follow the problem-solving
approach discussed in the first week of the class.
This is not part of your grade, but it will be extremely helpful to completing
this lab.
Lab: Problem Solving: Use appropriate loop construct (for, while, or do while) Write a
program that calculates the balance of a savings account at the end of a three-month
period. It should ask the user for the starting balance and the annual interest rate. A loop
should then iterate once for every month in the period, performing the following:
A) Ask the user for the total amount deposited into the account during the
month. Do not accept negative numbers. This amount should be added to
the balance.
B) Ask the user for the total amount withdrawn from the account during that
month. Do not accept negative numbers or numbers greater than the
balance after the deposits for the month have been added in.
C) Calculate the interest for that month. The monthly interest rate is the annual
interest rate divided by 12. Multiply the monthly interest rate by the average
of that month's starting and ending balance to get the interest amount for
the month. This amount should be added to the balance.
After the last iteration, the program should display a final report that includes the
following information.
Starting balance at the beginning of the three-month period
Total deposits (money amount) made during the three-month period
Total withdrawals (money amount) made during the three-month period
Total interest posted to the account during the three months
Final balance.
Submit lab11.cpp to Gradescope.
image text in transcribed

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

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

7. What traps should she avoid?

Answered: 1 week ago

Question

What is DDL?

Answered: 1 week ago