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 :

To address the problem of calculating telephone charges based on call duration and area codes, we can design a program that processes each call’s details and computes the total charge accordingly. Below is a structured approach to achieve this:
Program Output:
The program will display the following details for each call:
- Customer Area Code
- Customer Phone Number
- Called Area Code
- Called Number
- Call Time in Minutes
- Total Charge
Flowchart Explanation:
- Start: Initiate the program.
- Input Call Details: Collect the following information for each call:
- Customer Area Code
- Customer Phone Number
- Called Area Code
- Called Number
- Call Duration in Minutes
- Check Area Code:
- Compare the Customer Area Code with the Called Area Code.
- If they are the same, proceed to “Apply Local Rate”.
- If they are different, proceed to “Check Call Duration”.
- Check Call Duration:
- If the call duration exceeds 20 minutes, proceed to “Apply Long-Distance Rate”.
- If the call duration is 20 minutes or less, proceed to “Apply Local Rate”.
- Apply Long-Distance Rate:
- Calculate the total charge using the long-distance rate (20 cents per minute).
- Apply Local Rate:
- Calculate the total charge using the local rate (13 cents per minute).
- Display Call Details and Charge:
- Output all the collected call details along with the calculated total charge.
- End: Terminate the program.
Explanation:
- Input Call Details: The program begins by collecting all necessary information about the call.
- Check Area Code: It then checks if the call is within the same area code (local) or to a different area code (long-distance).
- Check Call Duration: For long-distance calls, it further checks if the call duration exceeds 20 minutes to determine the applicable rate.
- Apply Rates: Depending on the previous checks, the program applies either the local rate or the long-distance rate to calculate the total charge.
- Display Call Details and Charge: Finally, it displays all the call details along with the computed charge before ending the program.
This structured approach ensures that each call is billed accurately based on its specifics, adhering to the company’s billing policies.