#include
#include
//Calculate simple interest on a savings account compounded monthly.
//Gets user input for monthly deposite, number of months, and anual
//interst rate.
float deposite=0,rate=0,total=0;
int time=0;
int main()
{
cout << "monthly deposite" << endl;
cin >> deposite;
//cout << deposite << endl;
cout << "anual rate" << endl;
cin >> rate;
rate = (rate/12)/100;
//cout << rate << endl;
cout << "number of months" << endl;
cin >> time;
//cout << time << endl;
for (int counter=0;counter < time; counter++)
{
total = total + deposite;
total = (total*rate) + total;
//cout << total << endl;
}
cout << endl << "total savings after " << time << " months is " << total << endl;
cout << endl << "" << endl;
getchar();
return 0;
}