im just having so much confusion trying to figure out the right math to compute the interest. I know Im trying to calculate interest of each month...but the math statements throw me off. all i fized was the for loop. Other than that....im confused as to how i do the math calculations
this is what i fixed:
Code:#include <iostream> using namespace std; int main ( ) { int months, count = 1; double init_Balance, rate, interest = 0, new_balance, total_Interest = 0, int_Accumulated; char repeats; do { total_Interest = 0; { cout << " Credit card interest\n "; cout << "Enter: Initial balance, monthly interest rate as a decimal fraction, e.g. for 1.5% per month write 0.015, and the number of months the bill has run.\n "; cout << "I will give you the interest that has accumulated.\n "; cin >> init_Balance >> rate >> months; } for ( int count = 0; count < months; count++) { interest = ( rate * init_Balance ); new_balance = ( init_Balance + interest ); total_Interest = ( interest + ); cout << count ++; } cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); { cout << "Interest accumulated = $\n"; cin >> int_Accumulated; cout << "Y or y repeats, any other character quits. "; } }while ( repeats != 'Y' && repeats != 'y' ); return 0; }


