Question
formula Step 1. Prompt the user to enter the annual interest rate, the loan amount, and the number of years. (The interest rate is commonly
formula
Step 1. Prompt the user to enter the annual interest rate, the loan amount, and the number of years. (The interest rate
is commonly expressed as a percentage of the principal for a period of one year. This is known as the annual interest
rate.)
Step 2. The input for the annual interest rate is a number, such as 4.5. The program needs to convert it into a decimal by
dividing it by 100. To obtain the monthly interest rate from the annual interest rate, divide it by 12, since a year has 12
months. To obtain the monthly interest rate in decimal format, you must divide the annual interest rate in percentage by
1200. For example, if the annual interest rate is 4.5, then the monthly interest rate is 4.5/1200 = 0.00375
Step 3. Compute the monthly payment using the preceding formula.
Step 4. Compute the total payment, which is the monthly payment multiplied by 12 and multiplied by the number of
years.
Step 5. Display the monthly payment and total payment
This is in c++ on visual studio
loan Amount xmonthlyInterest Rate monthly Payment = 1- (1 + monthlyInterest Rate) numberOfYears x 12 totalPayment = monthly Payment x numberOfYears x 12Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started