60 535
Assignments Done
Successfully Done
In April 2018

Answer to Question #4316 in C++ for Najeb

Question #4316
write a program to compute the interest due, total amount due, and the minimum payment for a revolving account credit account. the program accepts the account balance as input, then adds on the interest to get the total amount due. the rate schedules are the following: the rate is 15% on the first, 1,000 pesos and 1% on any amount over that. the minimum payment is the total amount due is that is 10 pesos of 10% of the total amount owed, whichever is larger your program should include a loop that lets the user repeat this calculation until the user says she or he is done.
Expert's answer
#include "iostream"
using namespace std;
void main(){
float balance = 0;
cout << "balance >>";
cin >> balance;
float percent;
if (balance <= 1000) percent = 1.15;
if (balance > 1000) percent = 1.16;
cout <<"balance ="<< balance<<"\n";
balance *= percent;
cout <<"calculated balance = " << balance <<"\n";
float payment;
cout << "payment = ";
cin >> payment;
if (payment < 10) continue;
if (payment > ((balance/100)*10)) continue;
balance -= payment;
cout <<"balance"<< balance<<"\n";
cout <<"Exit?(1-yes)";
int quit;
cin >> quit;
if (quit == 1) break;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions