1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ivolga24 [154]
4 years ago
8

(Financial application: compare loans with various interest rates) Write a program that lets the user enter the loan amount and

loan period in number of years and displays the monthly and total payments for each interest rate starting from 5% to 8% with an increment of 1/8
Computers and Technology
1 answer:
Tomtit [17]4 years ago
6 0

Answer:

// Program is written in C++ programming language

// Comments are used for explanatory purpose

// Program starts here

#include <iostream>

#include <cmath>

using namespace std;

int main ()

{

// Variable Declarations

int years; double amount;

// Get input for loan amount and period (in years)

cout<<"Loan Amount: ";

cin>>amount;

cout<<"Number of Years: ";

cin>>years;

// Display table header

cout<<"Interest Rate Monthly Payment Total Payment";

// Calculate and display interest rates

// Start iteration

for (double i = 5.0; i <= 8; i += 0.125) {

cout<<i;

// Calculate Monthly Interest Rate

double monthlyRate = i / 1200;

// Calculate and Print Monthly Payment

double monthlyPay = amount * monthlyRate / (1 - 1 / pow(1 + monthlyRate, years * 12)); cout<<monthlyPay; cout<<"\n"<<(monthlyPay * 12) * years);

}

return 0;

}

// End of program

You might be interested in
Which operating system is used by most the supercomputer system in the world
DENIUS [597]

Answer:

Linux

Explanation:

Linux runs all of the top 500 supercomputers

3 0
2 years ago
How secure is a password protected word document?
tensa zangetsu [6.8K]
Secure enough to keep someone out who get on your pc but you should encrypted it so no one o the pc or remotely access it with out a password or with out decrypting it
8 0
4 years ago
A(n)______is a database object used to customiz
Blizzard [7]

Answer:

option B report is the right answer

4 0
3 years ago
Why is the cpu the most important component in a computer?
german
CPU (Central Processing Unit) is also known as the brain of the computer because this is the place which actually runs the programs. The programs are the set of instructions needed to perform a task.
4 0
3 years ago
CPT, which is used to code procedures in an office, is an example of a/an
ExtremeBDS [4]
 <span>Current Procedural Terminology

is used for general check up

</span>
3 0
3 years ago
Other questions:
  • When superiors providedirections to their subordinates regarding what to do, thisis
    5·1 answer
  • Search engines enable you to
    9·2 answers
  • Windows server 2012 r2 supports two types of folder shares. what are those two types?
    6·1 answer
  • What is the purpose of the operating systems processor management function
    7·1 answer
  • Edhesive 4.1 question 1
    9·1 answer
  • Write a C++ program that allows the user to enter double values. Display one of two messages: "The first number you entered is l
    9·1 answer
  • A company is updating their office routers that handle all incoming and outgoing networking traffic. They would like the PCs to
    10·1 answer
  • True or False: Variablename must start with a number.
    13·1 answer
  • What is the most popular monitor​
    11·1 answer
  • Which statement is true about hacking?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!