I need to calculate how much time it will take to pay off a credit card. I'll take any help.
Code:#include <iostream> using namespace std; int main() { float bal,ir,payment,year, newbal,newbal2; cout << "Enter credit card Balance" << endl; cin >>bal; cout <<"Enter Intrest rate" << endl; cin >>ir; cout << "Enter years:" << endl; cin>> year; for( newbal =1 ; newbal <=12 ; newbal++) { // Formula payment = ((bal*ir)/year)+10; cout << " Payment each month:"<< payment<< endl; newbal = bal + ir - payment; cout << newbal<<endl; newbal2 = (newbal-(payment*12)+ir); cout << newbal2<< endl; cout <<"total amount months to pay of debt " <<newbal2<< endl; } system("pause"); return 0;



LinkBack URL
About LinkBacks


