Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Assignment: The formula to calculate the number of months required to pay off a debt is represented by: annualInterestRate In(monthlyPayment) In (monthlyPayment - 1200.0

image text in transcribed

image text in transcribed

Programming Assignment: The formula to calculate the number of months required to pay off a debt is represented by: annualInterestRate In(monthlyPayment) In (monthlyPayment - 1200.0 xprincipal (annualInterest Rate In 1200.0 + 1.0 Note, however, that the natural logarithm functions have a stipulation of being a real number greater than 0. You'll work with your team today to individually write a C++ program and makefile that will ask for the values and display a report at the bottom. You will name your file calculate.cpp and include a makefile with compile, run, and clean commands. Your should name your executable calculate. out and your output should match the one below. Output Requirements: [10:03:54] cjanse@cerf3:-/CPSC1070/colabs/colab-01/colab-01C [64] make run ./ calculate.out ** Welcome to the CPSC 1071 Payment Calculator ** Enter the principal amount: 5000 Enter the annual interest rate (in %): 15 Enter the monthly payment: 100 Calculating... 79 months (6.6 years) are needed to pay your loan off. Did you know if you paid an additional $15 per month, you would pay off your loan 16 months earlier? Extra Credit Copy over your code to a new file called calculate2.cpp and add additional code to calculate the amount of interest that's paid and the total amount paid over the life of the loan. To assist, here's the formula to calculate interest on a monthly payment (note that number of payments refers to how many payments you'd make in a year). Add to your makefile compile2 which compiles calculate2.cpp with the executable being calculate.out interest rate number of payments * loan principal = interest Extra Credit Output Requirements: [21:13:47] cjanse@cerf3:-/CPSC1070/colabs/colab-01/colab-01C [20] make run ./calculate.out ** Welcome to the CPSC 1071 Payment Calculator ** Enter the principal amount: 5000 Enter the annual interest rate (in %): 15 Enter the monthly payment: 100 Calculating... 79 months (6.6 years) are needed to pay your loan off. Did you know if you paid an additional $10 per month, you would pay off your loan 16 months earlier? The total interest paid is $2895.6 and the total amount you'll pay is $7895.6

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

More Books

Students also viewed these Databases questions

Question

What is Aufbau's rule explain with example?

Answered: 1 week ago

Question

Write Hund's rule?

Answered: 1 week ago

Question

How would you describe your typical day at work?

Answered: 1 week ago

Question

2. Write two or three of your greatest weaknesses.

Answered: 1 week ago