// Rob Gross
// 3-13-02
// CS 170

#include <iostream.h>
#include <iomanip.h>
float repayment(float);

int main()

{

float principal;
float payment;
float rate;
int month = ++month;
float remainder = (principal*rate)-payment;

cout << "Enter your principal: $";
cin >> principal;
cout << "Enter your rate: ";
cin >> rate;
rate = rate/100;
rate += 1; //it should be > 1, so remaining increases
cout << endl;
cout << "----------------------------------";
cout << endl;
cout << endl;
cout << setiosflags(ios::left)
<< setw(12) << ++month
<< setw(12) << payment
<< setw(12) << remainder;
for (month=1; month <= 35; month++){
remainder *= rate;

cout << setw(12) << "\nMonth" << setw(11) << "\nPayment" << setw(12) <<"\nRemainder\n";
}

cout << "\n\n";
return 0;
}


--------------------Configuration: table - Win32 Debug--------------------
Compiling...
table.cpp
C:\Documents and Settings\Rob Gross\Desktop\WestConn\C++\Midterms\table.cpp(16) : warning C4700: local variable 'month' used without having been initialized
C:\Documents and Settings\Rob Gross\Desktop\WestConn\C++\Midterms\table.cpp(17) : warning C4700: local variable 'principal' used without having been initialized
C:\Documents and Settings\Rob Gross\Desktop\WestConn\C++\Midterms\table.cpp(17) : warning C4700: local variable 'rate' used without having been initialized
C:\Documents and Settings\Rob Gross\Desktop\WestConn\C++\Midterms\table.cpp(17) : warning C4700: local variable 'payment' used without having been initialized

table.obj - 0 error(s), 4 warning(s)