Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- double last_payment, total = 1000 ;
- int count = 0;
- cout << "With this, you can figure out how much will go towards your payment,"
- cout << " and how much will go into your interest payment.";
- while (total>50)
- {
- total = total - (50 - total * 0.15);
- count++;
- cout << "month "<< count << " remaining " << total; << "\n";
- }
- total= total- total * 0.15;
- cout << "last payment " << total << "\n";
- cout << "You have paid the amount of" << 1000 << " in "<< count << "months\n";
- return 0;
- }
- // FIX BY MAHORAZ
- #include <iostream>
- using namespace std;
- int main()
- {
- double last_payment, total = 1000 ;
- int count = 0;
- cout << "With this, you can figure out how much will go towards your payment,"
- cout << " and how much will go into your interest payment.";
- while (total>50)
- {
- total = total - (50 - total * 0.15);
- count++;
- cout << "month "<< count << " remaining " << total; << "\n";
- }
- total= total- total * 0.15;
- cout << "last payment " << total << "\n";
- cout << "You have paid the amount of" << 1000 << " in "<< count << "months\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement