//monthly payment on a loan formula steps
//1 + rate all to the power of n
//above times rate
//all over line 2 minus 1
//all above times L
//Rate is the monthly interest rate--expressed as a decimal value,
//which is the annual interest rate divided by 12.
//n is number of payments
//L is amount of loan
#include <iostream>
#include <iomanip>
#include <cmath> //to use math commands and for pow()
using namespace std;
int main()
{
double interest_rate;
double loan;
int amount_of_payments;
How can the program print results if it doesn't run?
Once you fix you syntax errors you will get the following output. http://cpp.sh/8ayfg
In function 'int main()':
34:32: error: statement cannot resolve address of overloaded function
41:74: error: expected ')' before ';' token
45:41: error: statement cannot resolve address of overloaded function
Hint: endl is used only with << operator
Enter loan amount: $1000
Enter annual interest rate: 10
Enter the amount of payments: 10
Loan amount: $ 1000.00
Monthly Interest Rate: 10%
Number of Payments: 10
Monthly Payment: $ 162.75
Amount Paid Back: $ 1627.45
Interest Paid: $ 627.45