A telephone company charges to cents per minutefor all calls outside the customers area code that last over 20 minutes

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:

Correct Answer: Flowchart Description & Logic

To solve this problem, we need to calculate the total charge for each call based on two rules:

  1. If the call is outside the customer’s area code and the duration is more than 20 minutes, the rate is 2 cents per minute.
  2. Otherwise, the rate is 13 cents per minute.

🔄 Steps to Create the Flowchart:

  1. Start
  2. Input the following:
  • Customer Area Code
  • Customer Phone Number
  • Called Area Code
  • Called Number
  • Call Time in Minutes
  1. Compare Customer Area Code and Called Area Code
  2. Check if they are different
  • If No → Use 13 cents/minute
  • If Yes → Check Call Time:
    • If greater than 20 minutes → Use 2 cents/minute
    • If 20 minutes or less → Use 13 cents/minute
  1. Calculate Total Charge = Rate × Call Time
  2. Display:
  • Customer Area Code
  • Customer Phone Number
  • Called Area Code
  • Called Number
  • Call Time
  • Total Charge
  1. End

🔁 Flowchart (Text Description)

[Start]
   |
[Input: Cust Area Code, Cust Phone, Called Area Code, Called Phone, Time]
   |
[Is Cust Area Code = Called Area Code?]
   |--Yes--> [Rate = 13]
   |
   |--No--> [Is Time > 20?]
                 |--Yes--> [Rate = 2]
                 |--No---> [Rate = 13]
   |
[Total Charge = Rate × Time]
   |
[Display all fields and Total Charge]
   |
[End

This program evaluates telephone charges based on call duration and whether the call is local or long-distance. The data fields include both customer and called numbers, along with their area codes and call duration in minutes.

The central condition is based on whether the area codes differ and if the call duration exceeds 20 minutes. The reasoning is that long-distance calls exceeding 20 minutes are charged at a discounted rate of 2 cents per minute. All other calls, including local or short-duration long-distance calls, are charged at 13 cents per minute.

The flowchart begins with inputting necessary data such as area codes, phone numbers, and time in minutes. The first decision is to compare the customer’s area code with the called area code. If they are the same, the call is considered local and charged at 13 cents per minute.

If the area codes differ, indicating a long-distance call, the program checks if the call lasted more than 20 minutes. Only then does it apply the lower rate of 2 cents per minute. If not, it defaults back to 13 cents per minute.

The final step calculates the total charge by multiplying the chosen rate with the call time. The output then displays all call details along with the computed charge.

This logical structure ensures accurate billing based on call specifics and makes the flowchart a useful tool for developers or programmers who will implement it in software. The flowchart simplifies decision-making, making the billing process transparent and efficient.

Scroll to Top