A telephone company charges to cents per minutefor all calls outside the customers area code that last over 20 minutes .All other calls are 13 percents minute.Fields for each call include customer area code (three digits),customer phone number (seven digits),called area code (three digits),called number(seven digits)and called time in minutes(four digits).Display the customer area code,customer phone number,called area code,called number,called time in minutes and the total charge.Draw the flowchart for this program.
The correct answer and explanation is :
Understanding the Problem
- The telephone company charges 10 cents per minute for calls outside the customer’s area code that last over 20 minutes.
- All other calls are charged at 13 cents per minute.
- We need to calculate and display:
- Customer area code
- Customer phone number
- Called area code
- Called number
- Call duration
- Total charge
Algorithm Steps
- Input the required details:
- Customer area code (3 digits)
- Customer phone number (7 digits)
- Called area code (3 digits)
- Called number (7 digits)
- Call duration in minutes (4 digits)
- Determine the call rate:
- If the customer area code is different from the called area code AND call time is more than 20 minutes, apply 10 cents per minute.
- Otherwise, apply 13 cents per minute.
- Calculate the total charge:
- Multiply the call duration by the applicable rate.
- Display the output:
- Show customer area code, customer phone number, called area code, called number, call time, and total charge.
Flowchart Explanation
- Start
- Input customer details (area code, phone number, called area code, called number, call time).
- Check if the call is outside the area code and greater than 20 minutes:
- Yes → Rate = 10 cents per minute
- No → Rate = 13 cents per minute
- Calculate total charge (
Charge = Time * Rate) - Display the results.
- End the program.

Here is the flowchart illustrating the logic for the telephone billing system. It visually represents the steps required to calculate the total charge based on the conditions provided.
Explanation of the Flowchart
- Start the process.
- Input the customer and call details.
- Check if the call is outside the area code AND lasts more than 20 minutes:
- Yes → Apply 10 cents per minute.
- No → Apply 13 cents per minute.
- Calculate the total charge using
Charge = Time * Rate. - Display the results.
- End the process.
This ensures accurate calculation of call charges based on the company’s policy.