Question #42136

Write a program in ( c++) to calculate Effective Period Rate (EPR) and (ER) Effective Rate:

Formula : Effective Period Rate = Nominal Annual Rate / n

Example:

What is the effective period interest rate for nominal annual interest rate of 5% compounded monthly?

Solution:

Effective Period Rate = 5% / 12 months = 0.05 / 12 = 0.4167%

Formula : Effective Rate = (1 + Nominal Rate / n)n – 1

Formula : Effective Period Rate = Nominal Annual Rate / n

Example:

What is the effective period interest rate for nominal annual interest rate of 5% compounded monthly?

Solution:

Effective Period Rate = 5% / 12 months = 0.05 / 12 = 0.4167%

Formula : Effective Rate = (1 + Nominal Rate / n)n – 1

Expert's answer

`#include <iostream>`

using namespace std;

int main() {

double nominal_rate;

int number_of_months;

cout << "Enter nominal rate: ";

cin >> nominal_rate;

cout << "Enter number of months: ";

cin >> number_of_months;

nominal_rate*=0.01;

cout.precision(4);

cout << "Effective Period Rate = " << fixed << nominal_rate/number_of_months*100 << "%\n";

cout << "Effective Rate = " << fixed << ((1 + nominal_rate/number_of_months)*number_of_months-1)*100 << "%\n";

return 0;

}

## Comments

## Leave a comment