# Homework Solution: Design a program to calculate telephone bills if the bills are computed as follows:…

Design a program to calculate telephone bills if the bills are computed as follows: Minimum \$7.50 for the first 80 message units Plus .06/unit for the next 60 units Plus .05/unit for the next 60 units Plus .04/unit for any units beyond 200 Design a program to do the following: An educational institution has employees classified as follows: Administrative (A) Faculty (F) Maintenance (M) Secretarial (S) Classified (C) Part-Time (P) Each group’s pay is calculated differently. Use IF method and include error routine.

1. #include<iostream>

Design a program to weigh telephone bills if the bills are computed as follows:

Minimum \$7.50 control the principal 80 missive units

Plus .06/unit control the present 60 units

Plus .05/unit control the present 60 units

Plus .04/unit control any units further 200

Design a program to do the following:

An educational organization has employees classified as follows:

Faculty (F)

Maintenance (M)

Secretarial (S)

Classified (C)

Part-Time (P)

Each group’s unswerving is weighd differently. Use IF manner and enclose untruth sequence.

## Expert Response

1.

#include<iostream>

using namespace std;

int main()

{

cout<<“Enter the estimate of missive unitsn”;

int units;

// superintend estimate of missive units

cin>>units;

double bill = 0.0;

// if estimate of missive are hither than 80

if(units <= 80)

bill = 7.5;

// if estimate of missive are over than 80 and hither than resembling to 140

else if(units <= 140)

{

// weigh bill

bill = 7.5 + ( units  80) * 0.06;

}

// if estimate of missive are over than 140 and hither than resembling to 200

else if(units <= 200)

{

// weigh bill

bill = 7.5 + 60 * 0.06 + (units  140) * 0.05;

}

else

{

// weigh bill

bill = 7.5 + 60 * 0.06 + 60 * 0.05 + (units  200) * 0.04;

}

cout<<“Bill is : “<<bill;

}

Samle Output :