Iam trying to calculate a mortage for a class project, and I cant get the formula to calculate it right.
I have this so far
//calculate input items:
//Calculate present value (principal)
principal= payment * (interestRate / (1-pow(interestRate + 1,-term)));
//display output items
cout << fixed;
cout.precision(2);
cout <<"Your monthly payments will be $" <<principal << endl;
cout << fixed;
outFile.precision(2);
outFile << "Your monthly payments will be $" << principal << endl;
outFile.close();
return 0
}
Do you see where I have the calculation? What could I be doing wrong. I am trying to input $60,000 at 8% interest for 25 years.To get the correct answer, and it gives me either payments are $0.00, or another ridiculous number
Pleese help me, Iam not soo good at algebra- ic expressions. me the snookmann (Newbie at C++)
I have this so far
//calculate input items:
//Calculate present value (principal)
principal= payment * (interestRate / (1-pow(interestRate + 1,-term)));
//display output items
cout << fixed;
cout.precision(2);
cout <<"Your monthly payments will be $" <<principal << endl;
cout << fixed;
outFile.precision(2);
outFile << "Your monthly payments will be $" << principal << endl;
outFile.close();
return 0
}
Do you see where I have the calculation? What could I be doing wrong. I am trying to input $60,000 at 8% interest for 25 years.To get the correct answer, and it gives me either payments are $0.00, or another ridiculous number
Pleese help me, Iam not soo good at algebra- ic expressions. me the snookmann (Newbie at C++)