Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C++ take this program and modify it to handle data input for the principal, annual interest rate, and number of months from the keyboard.

Using C++ take this program and modify it to handle data input for the principal, annual interest rate, and number of months from the keyboard. Use appropriate prompting messages, such as: "Enter the annual interest rate: Write a program that calculates earned simple interest given the principal (P), annual interest rate, and time (T) in months. The formula is I = P * R * T You must assign values to the variables in the program (no keyboard input during program run time). Example: float prin = 1200.0; R (rate) needs to be in decimal form. This means a 10% annual interest rate is represented as 0.1, 5% would be 0.05, etc. For the formula to work, the annual interest rate needs to be divided by 12 to get the monthly interest rate. (I = P * R/10/12 * T) Money, interest rate, and interest are real numbers, so use type float for them. To summarize, if the annual interest rate (AIR) is 8%, then R is AIR divided by 100 (convert to decimal form), and then divided by 12 (convert to monthly rate). There in no compounding (if you don't know what this means, don't worry about it). The result should be output to the screen in the following manner: Principal: $pppp.pp Annual Interest Rate: rr.r% Number of Months: mm Interest Earned: $iiii.ii Use the following test data in your program: principal: $1200.00 annual interest rate: 8.5% (.085) number of months: 12

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

Practical Oracle8I Building Efficient Databases

Authors: Jonathan Lewis

1st Edition

0201715848, 978-0201715842

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago