Question

In: Computer Science

In c++ format please Bank Charges A bank charges $10 per month plus the following check...

In c++ format please

Bank Charges
A bank charges $10 per month plus the following check fees for a commercial checking account:

  • $.10 each for fewer than 20 checks

  • $.08 each for 20–39 checks

  • $.06 each for 40–59 checks

  • $.04 each for 60 or more checks


The bank also charges an extra $15 if the balance of the account falls below $400 (before any check fees are applied).

Write a program that asks for the beginning balance and the number of checks written. Compute and display the bank’s service fees for the month.


Input Validation: Do not accept a negative value for the number of checks written. If a negative value is given for the beginning balance, display an urgent message indicating the account is overdrawn.

Solutions

Expert Solution

SOLUTION-
I have solve the problem in C++ code with comments and screenshot for easy understanding :)

CODE-

//c++ code
#include <iostream>
using namespace std;
//main
int main()
{
double charges = 10; // As bank charges $10 per month
double balance;
int checks;

cout<<"Enter beginning balance: ";
cin>>balance;   //gets input from user
cout<<"Enter number of checks written: ";
cin>>checks;

/* Calculating charges accoeding to number of checks written */
if(checks>=60)
charges+=checks*0.04;
else if(checks>=40)
charges+=checks*0.06;
else if(checks>=20)
charges+=checks*0.08;
else
charges+=checks*0.010;

/* Applying charges if balance falls below $400 */
if(balance<400)
charges+=15;

cout<<"Banks' service fees for the month = $"<<charges;
return 0;
}


SCREENSHOT-


IF YOU HAVE ANY DOUBT PLEASE COMMENT DOWN BELOW I WILL SOLVE IT FOR YOU:)
----------------PLEASE RATE THE ANSWER-----------THANK YOU!!!!!!!!----------


Related Solutions

Write in C++ Comment Steps A bank charges $10 per month plus the following check fees...
Write in C++ Comment Steps A bank charges $10 per month plus the following check fees for a commercial checking account: $0.10 each for fewer than 20 checks $0.08 each for 20 - 39 checks $0.06 each for 40 - 59 checks $0.04 each for 60 or more checks The bank also charges an extra $15 if the balance of the account falls below $400 (before any check fees are applied). Write a program that asks for the beginning balance...
A bank charges $10 per month plus the following check fees for a commercial checking account:...
A bank charges $10 per month plus the following check fees for a commercial checking account: $.10 each for less than 20 checks $.08 each for 20 - 39 checks $.06 each for 40 - 59 checks $.04 each for 60 or more checks Write a program that prompts the user for the number of checks written each month. Then compute and display the bank’s total service fees for the month. Make sure the output displays with a $ and...
please with java and in JOptionPane if possible .bank charges 10.00 per month plus the following...
please with java and in JOptionPane if possible .bank charges 10.00 per month plus the following fees for a checking account:     .10 each for less than 20 checks    . 08 each for 20 – 39 checks     .06 each for 40 – 59 checks     .04 each for 60 or more checks The bank also charges an extra 15.00 if the balance of the account falls below $400 (before any check fees are applied). Write a program that...
Westside Energy charges its electric customers a base rate of $4.00 per month, plus 12¢ per...
Westside Energy charges its electric customers a base rate of $4.00 per month, plus 12¢ per kilowatt-hour (kWh) for the first 300 kWh used and 3¢ per kWh for all usage over 300 kWh. Suppose a customer uses x kWh of electricity in one month. (a) Express the monthly cost E as a piecewise defined function of x. (Assume E is measured in dollars.) E(x) = A.  if 0 ≤ x ≤ 300 B.  if 300 < x C. (b) Graph the...
Derek can deposit $283.00 per month for the next 10 years into an account at Bank...
Derek can deposit $283.00 per month for the next 10 years into an account at Bank A. The first deposit will be made next month. Bank A pays 15.00% and compounds interest monthly. Derek can deposit $2,468.00 per year for the next 10 years into an account at Bank B. The first deposit will be made next year. Bank B compounds interest annually. What rate must Bank B pay for Derek to have the same amount in both accounts after...
Derek can deposit $254.00 per month for the next 10 years into an account at Bank...
Derek can deposit $254.00 per month for the next 10 years into an account at Bank A. The first deposit will be made next month. Bank A pays 13.00% and compounds interest monthly. Derek can deposit $2,488.00 per year for the next 10 years into an account at Bank B. The first deposit will be made next year. Bank B compounds interest annually. What rate must Bank B pay for Derek to have the same amount in both accounts after...
Derek can deposit $294.00 per month for the next 10 years into an account at Bank...
Derek can deposit $294.00 per month for the next 10 years into an account at Bank A. The first deposit will be made next month. Bank A pays 12.00% and compounds interest monthly. Derek can deposit $2,445.00 per year for the next 10 years into an account at Bank B. The first deposit will be made next year. Bank B compounds interest annually. What rate must Bank B pay for Derek to have the same amount in both accounts after...
erek can deposit $203.00 per month for the next 10 years into an account at Bank...
erek can deposit $203.00 per month for the next 10 years into an account at Bank A. The first deposit will be made next month. Bank A pays 13.00% and compounds interest monthly. Derek can deposit $2,592.00 per year for the next 10 years into an account at Bank B. The first deposit will be made next year. Bank B compounds interest annually. What rate must Bank B pay for Derek to have the same amount in both accounts after...
18) Suppose a local swimming pool either charges $10 per person (per visit) OR charges a...
18) Suppose a local swimming pool either charges $10 per person (per visit) OR charges a reduced price of $5 per person (per visit) if that person has an annual membership. The annual membership costs $50. Next, assume John preferences are formed such that he values trips to the swimming pool in the following manner: his first visit is valued at $20 and each subsequent visit is worth $1 less ($19 for visit #2, $18 for visit #3, #1 for...
Derek can deposit $266.00 per month for the next 10 years into an account at Bank A. The first deposit will be made next month. Bank A pays 12.00%
Derek can deposit $266.00 per month for the next 10 years into an account at Bank A. The first deposit will be made next month. Bank A pays 12.00% and compounds interest monthly. Derek can deposit $2,572.00 per year for the next 10 years into an account at Bank B. The first deposit will be made next year. Bank B compounds interest annually. What rate must Bank B pay for Derek to have the same amount in both accounts after...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT