Write a C++ program that accepts an amount of money on deposit and a number of years it has been on deposit (years can have decimals). It will determine the interest to be paid on the deposit based on the following schedule:

Time on Deposit Interest Rate >= 5 years 4.5% Less than 5 and >=4 years 4% Less than 4 and >=3 years 3.5% Less than 3 and >=2 years 2.5% Less than 2 and >=1 years 2% Less than 1 year 1.5%Compute the interest with the formula: Interest = Deposit * IntRate * Years.

Respuesta :

Answer:

Explanation:

#include <iostream>

int main() {

double Deposit,  Year, IntRate;

cin>>"Please enter the deposit here">>Deposit;

cin>>"kindly enter the numbers of years here">>Year;

if (year >=5)

IntRate = 4.5/100;

else if (year >=4)

IntRate = 4/100;

else if (year >=3)

IntRate = 3.5/100;

else if (year >=2)

IntRate = 2.5/100;

else if (year >=1)

IntRate = 2/100;

else

IntRate = 1.5/100;

Interest = Deposit * IntRate * Years;

return 0;

}

ACCESS MORE