Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help in c++ Assuming there are no deposits other than the original investment, the balance in a savings account after one year may be calculated

help in c++

image text in transcribed

Assuming there are no deposits other than the original investment, the balance in a savings account after one year may be calculated as: amount=principal(1+Trate)T Where principal = original balance in the account rate = interest rate T= number of times the interest is compounded during a year ( T is 4 if the interest is compounded quarterly) Program Requirements: - Incorporate the use of good comments - Incorporate self-documenting variable names ( T is not a good variable name for the number of times the interest is compounded) - Variables for principal and the interest rate should be of type double and the number of times the interest is compounded should be of type int - Read in the principal, the interest rate, and the number of times the interest is compounded in that order - Compute the new amount in the savings account using the above formula - Hint: Look at slide 4 of CS1336_Lect3d_Math_expressions.pptx for an example of the pow () function. - Display the interest rate, times compounded, principal, interest, and current amount in the account as specified. When the input is as shown in Figure 1, the output should appear as shown in Figure 2. - There are 8 dashes on either side of the "Interest Earned" string literal - Output the remaining string literals left-justified in a field width of 20, followed by a space or dollar sign as appropriate (use left setw(20)) - Output the numeric variables right-justified in a field width of 9 (use right

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

DNA Databases

Authors: Stefan Kiesbye

1st Edition

0737758910, 978-0737758917

More Books

Students also viewed these Databases questions

Question

What does the CCE ratio measure? Why is it important?

Answered: 1 week ago