Code is working at the moment, I am having problems trying to do calculations within it. I am trying to come out with the monthly payment of 430.46. I'm confused on how my calculations are not going through right. it always comes back either 0, or 1#inf. Matticus said its my order of operations mess up, but I am clueless on how to put it in to run correctly.
Code:
//Monthly Payment on New car
#include <cstdlib>
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int num1;
int num2;
double num3;
int num4;
int num5;
double num6;
float math;
math = pow(1+0.00541666666,60);
float math2;
math2 = pow(0.00541666666,60);
//Down Payment
num1 = 2200;
//Car Price
num2 = 22000;
//Monthly interest rate
num3 = 0.00541666666;
//Number of Months all together
num4 = 60;
// Year
num5 = 12;
// APR
num6 = 6.5;
cout << "Prices on my new car!" << endl;
cout << "Purchase Price= "<< num2 << endl;
cout << "Yearly APR=%"<< num6 << endl;
cout << "Monthly Interest= "<< num6 / num5 << endl;
cout << "Interest* (purchase-Downpayment)= "<< num3 * (num2 - num1);
system("PAUSE");
return 0;
}