Question

In: Computer Science

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 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

#include <iostream>

using namespace std;

int main(){

double balance;

int noCheques;

double chequeFee;

cout<<"Enter the initial balance : ";

cin>>balance;

if(balance<0){

  cout<<"ACCOUNT IS OVERDRAWN ";

  return 0;

}

cout<<"Enter the number of cheques : ";

cin>>noCheques;

balance-=10; // subtracting the monthly charges

//checking if balance comes under 400

// if comes charge $15

if(balance<400)

  balance-=15;

//finding chequeFees

if(noCheques<20)

  chequeFee=noCheques*0.1;

else if(noCheques>=20 && noCheques<40)

  chequeFee=noCheques*0.08;

else if(noCheques>=40 && noCheques<60)

  chequeFee=noCheques*0.06;

else

  chequeFee=noCheques*0.04;

//subtracting the chequeFees

balance-=chequeFee;

//checking if balance comes under 400

// if comes charge $15

if(balance<400)

  balance-=15;

cout<<"Chequee Fees : "<<chequeFee<<endl;

cout<<"Balance : "<<balance;

}

Note : If you like my answer please rate and help me it is very Imp for me


Related Solutions

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...
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...
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...
BOZ abolishes unwarranted bank charges The Bank of Zambia Prohibition Against Unwarranted Bank Charges and Fees...
BOZ abolishes unwarranted bank charges The Bank of Zambia Prohibition Against Unwarranted Bank Charges and Fees of 2018 has now been promulgated into law (Government Gazette number 6693) and Bank of Zambia. This is according to a Circular issued by Deputy Governor-Operations Dr Bwalya Ngandu.However, the Bankers Association of Zambia has warned that the decision to abolish bank charges will only cripple the financial services industry and may result in job losses for some workers in the sector. Association Chief...
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...
Write a C program that does the following. (a) Start with comment statements at the top...
Write a C program that does the following. (a) Start with comment statements at the top (before your includes) with the following info: Name, Date (b) Write the following functions: void setupRandArray(int n, int x[], int min, int max) void printArray(int n, int x[], char label[]) float getAverage(int n, int x[]) int getMaximum(int n, int x[]) int getCountInRange(int n, int x[], int min, int max) Note: This function returns the number elements of x that are between min and max...
An airline charges the following baggage fees: $25 for the first bag and $35 for the...
An airline charges the following baggage fees: $25 for the first bag and $35 for the second. Suppose 54% of passengers have no checked luggage, 34% have one piece of checked luggage and 12% have two pieces. Suppose that a negligible portion of people check more than two bags. a) Build a probability model, compute the average revenue per passenger, and compute the corresponding standard deviation. b ) About how much revenue should the airline expect for a flight of...
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT