Sunday

March 1, 2015

March 1, 2015

Posted by **josh** on Wednesday, March 10, 2010 at 7:46pm.

$.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++

- computer science -
**Anonymous**, Monday, October 4, 2010 at 2:43pmA software company sells a package that retails for $99.Quantity discounts are given according to the following table:

- computer science -
**kory**, Tuesday, January 17, 2012 at 9:13pm#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!

**Answer this Question**

**Related Questions**

Computer Programming - Hello, Any help on the following problem would be greatly...

Algebra :/ - A bank offers two checking plans anywhere charge .15 cents a check...

ALGEBRA 1 A - Would someone check my answer please? Thank you. A bank offer two ...

Accounting - Can someone show me this bank reconciliation? On Aug 14th, One of ...

Bank Reconciliation - Aug 14th, One of our Partner's ( Compuville ) cash book ...

Accounting - Need help with this bank reconciliation...this is actually for a ...

math - Ann had a balance of $25 in her checking account. She wrote three checks ...

finance - computing checking account balance. based on the following information...

Computer - I have the answer I was looking for, but do not know exactly how to ...

math - Eliza Savage received a statement from her bank showing a checking ...