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:

To solve this problem, we need to create a flowchart and a program that calculates the total charge for telephone calls based on the customer’s and called area codes, and the call duration. Here’s the logic breakdown:


Problem Summary:

  • All calls outside the customer’s area code AND lasting more than 20 minutes cost 2 cents per minute.
  • All other calls (same area code OR 20 minutes or less) cost 13 cents per minute.
  • Inputs:
    • Customer area code (3 digits)
    • Customer phone number (7 digits)
    • Called area code (3 digits)
    • Called number (7 digits)
    • Call duration in minutes (up to 4 digits)
  • Output:
    • All input values plus total charge for the call.

📈 Flowchart Description:

Here’s a step-by-step text-based description of what the flowchart should include:

  1. Start
  2. Input:
    • Customer area code
    • Customer phone number
    • Called area code
    • Called phone number
    • Call duration (in minutes)
  3. Decision 1: Is the called area code ≠ customer area code?
    • Yes → go to Decision 2
    • No → Rate = 13 cents per minute
  4. Decision 2: Is call duration > 20 minutes?
    • Yes → Rate = 2 cents per minute
    • No → Rate = 13 cents per minute
  5. Compute Total Charge = Rate × Call Duration
  6. Display:
    • Customer area code
    • Customer phone number
    • Called area code
    • Called number
    • Call duration
    • Total charge
  7. End

🧠 300-Word Explanation:

The task is to compute the cost of a telephone call based on specific rate conditions. The cost depends on the area code and duration of the call. If the called area code is different from the customer’s area code and the call lasts more than 20 minutes, a reduced rate of 2 cents per minute applies. This likely encourages customers to make longer calls outside their local area. All other scenarios—including shorter long-distance calls or calls within the same area code—are billed at a standard 13 cents per minute.

The logic behind this billing model is to give customers a discount for engaging in longer long-distance communications, possibly as a marketing tactic. The flowchart helps visualize the program’s decision-making steps: we first determine if the call is a long-distance one by comparing the area codes. If it’s long-distance, we check if the call duration exceeds 20 minutes. This leads us to set the proper rate and finally compute the charge.

This kind of flowchart is useful in telecommunication software, billing systems, and customer support tools, ensuring that customers are charged correctly. Displaying all relevant information—like phone numbers, area codes, call duration, and charge—ensures transparency and accuracy.

A proper implementation of this logic ensures that all customers are billed fairly based on clearly defined criteria, and it streamlines the process of developing or debugging billing software.


📌 Flowchart Diagram (Text Representation)

[Start]
   ↓
[Input: Cust. Area, Cust. Number, Called Area, Called Number, Time]
   ↓
[Is Called Area ≠ Cust. Area?] 
   ↓Yes                       ↓No
[Is Time > 20 min?]        [Rate = 13]
   ↓Yes    ↓No
[Rate=2] [Rate=13]
   ↓
[Total = Rate × Time]
   ↓
[Display all info + Total]
   ↓
[End]

Let me know if you’d like a visual flowchart diagram (image).

Scroll to Top