computer science

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

write a program that asks for the number of checks written during the past moth, then computers and displays the bank's fees for the month

in a C++

  1. 👍
  2. 👎
  3. 👁
  1. A software company sells a package that retails for $99.Quantity discounts are given according to the following table:

    1. 👍
    2. 👎
  2. #include<iostream>
    #include<iomanip> // manipulator

    using namespace std;
    void main ()
    {
    bool number = true; // flag
    int Nchecks; // number of ticket
    float Obalance, // opening balance
    Cfee, // checking fee
    Cbalance; // closing balance
    const float Mfee=10, // monthly fee
    Exfee=15; // extra fee

    cout << "Enter your beginning balance: ";
    cin >> Obalance;
    cout << endl << "Enter your number of check written:";
    cin >> Nchecks;
    cout << endl << endl << "Bank Statement" << endl<<endl;

    if ( Nchecks < 0 ) // flag statement
    {
    number = false;
    cout << "Invalid number" << endl;
    cout << "Input the number greater than 0" << endl;
    }

    else if ( Nchecks>=0&&Nchecks< 20 ) // else if statements
    Cfee = 10;
    else if ( Nchecks>=20&&Nchecks<=39)
    Cfee = 8;
    else if ( Nchecks>=40&&Nchecks<=59)
    Cfee = 6;
    else if ( Nchecks>=60)
    Cfee = 4;

    Cbalance = Obalance + Mfee + Cfee; // calculation

    if ( Obalance < 400) // case of under 400
    {
    if ( Nchecks>=0&&Nchecks< 20 )
    Cfee = 10;
    else if ( Nchecks>=20&&Nchecks<=39)
    Cfee = 8;
    else if ( Nchecks>=40&&Nchecks<=59)
    Cfee = 6;
    else if ( Nchecks>=60)
    Cfee = 4;

    Cbalance=Obalance + Mfee + Cfee + Exfee;
    }

    if ( number ) // for true flag
    {
    cout<<setprecision(2)<<setiosflags(ios::fixed|ios::showpoint);
    cout<<"Opening Balance:"<<setw(14)<<"$"<<setw(10)<<Obalance<< endl;
    cout<<"Monthly Fee:"<<setw(18)<<"$"<<setw(10)<<Mfee<<endl;
    cout<<"Checking Fee:"<<setw(17)<<"$"<<setw(10)<<Cfee<<endl;
    cout<<"Closing Balance:"<<setw(14)<<"$"<<setw(10)<<Cbalance<<endl;
    }

    }

    here is one way hope it helps!

    1. 👍
    2. 👎
  3. #include <iostream>
    using namespace std;


    int main()
    {


    double checks;
    int monthBankCharge = 10;
    cout << "Enter the amount of checks you've written in the past month\n";

    cin >> checks;

    if (checks < 20)
    { cout << checks * 0.10 << endl;}

    else if (checks >= 20)
    { cout << checks* 0.08 << endl;}

    else if (checks >= 40)
    { cout << checks * 0.06 << endl;}

    else if (checks >= 60)
    { cout << checks * 0.04 << endl;}



    system("pause");
    return 0;

    1. 👍
    2. 👎

Respond to this Question

First Name

Your Response

Similar Questions

  1. algebra

    A bank charges $3 each time you use an out-of-network ATM. At the beginning of the month, you have $1500 in your bank account. You withdraw $60 from your bank account each time you use an out-of-network ATM. Graph a linear

  2. Math

    Jessica wants to accumulate $15,000 by the end of 4 years in a special bank account, which she had opened for this purpose. To achieve this goal, Jessica plans to deposit a fixed sum of money into the account at the end of the

  3. Macroeconomics

    If it looks like a bank won't meet the Federal Reserve Bank's reserve requirement, normally it will first turn to the: A) other member banks and borrow at the federal funds rate. B) Fed and borrow at the discount rate. C) open

  4. Finite Mathematics

    Jessica wants to accumulate $14,000 by the end of 5 yr in a special bank account, which she had opened for this purpose. To achieve this goal, Jessica plans to deposit a fixed sum of money into the account at the end of the month

  1. Business Math

    The company opened a special checking account. The charge for each check written was either .55 or $6 a month whichever is greater. At the beginning of the month, the company checkbook balance was $695.18. The company wrote 14

  2. Accounting

    A check returned by a bank because the issuer's cash account balance could not cover the check is called a(n): a. Cancelled check b. Certified check c. Outstanding check d. NSF check

  3. math

    Eliza Savage received a statement from her bank showing a checking account balance of $324.18 as of January 18. Her own checkbook shows a balance of $487.38 as of January 29. The bank returned all of the cancelled checks but

  4. finance

    computing checking account balance. based on the following information,determine the true balance in your checking account. balance in your checkbook-$356 balance on bank statement,$472 service charge and other fees, $15 interest

  1. math

    Javier had $305 in his bank account. His bank charges a fee of $7.50 each month that a balance is below $500. If he makes no other deposits or withdrawals, how much money is in Javier’s account at the end of three months? Enter

  2. Algebra

    Amy has some money in her checking account. If she writes a check for $40.50, her checking account will be overdrawn by $21.50. Find how much money is Amy’s checking account now. My Answer (please correct if wrong): 40.5 -

  3. Math

    While preparing the February 28th bank reconciliation for the checking account for Willow, Inc., the accountant identified the following items: Willow's balance according to the general ledger $46,200 Outstanding checks $1,100

  4. math

    Blake’s balance in his checking account at the beginning of the month was $42.68. Blake’s bank statement for this month showed the following withdrawals and deposits in his checking account: $35.42, $-13.55, $52.12, $11.50,

You can view more similar questions or ask a new question.