Hey guys, if anyone can help I'd greatly appreciate it. I have this homework problem that doesn't seem to wanna work with me.

"you have bought a car, taking out a loan with annual interest rate of 9%. You will make 36 monthly payments of $165.25 each. You want to keep track of the remaining balance you owe after each monthly payment. The formula for the remaining balance is:

Bal k= pmt[1-(1+i)^(k-n)]/i

Bal k = balance remaining after kth payment

k= payment number (1,2,3...)

pmt= amount of monthly payment

i= interest rate per month (annual rate /12)

n= total number of payments to be made.

If you're still reading this ..here is the source code I've gotten so far... Please Help

#include<iomanip.h>

#include<math.h>

main()

{ _asm finit;

int K, N;

float Pmt=165.25, I=.09, Bal;

for (N=1;N<=36;N++){

cout<<"\nPayment Number: "<<N<<endl;

Bal = Pmt* (1- pow((1+(I/12)),N-K))/(I/12);

cout.setf(ios::floatfield, ios::showpoint);

cout.setf(ios::fixed) ;

cout<<setprecision(2) ;

cout<<"Monthly Payment is: $" <<Pmt<<endl; cout<<"Monthly Interest Rate is: " <<I<<endl ;

cout<<"Total Number of Payments is: "<<N<<endl ;

cout<<"Balance is : $" <<Bal<<endl;

}//for loop

return 0;

}//main