Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The Chat - A - While phone company provides service to six area codes and charges the per - minute rates for phone calls shown
The ChatAWhile phone company provides service to six area codes and charges the perminute rates for phone calls shown in Figure below
Write a program named ChatAWhile that stores the area codes and rates in parallel arrays and allows a user to enter an area code and the length of time for a call in minutes, and then display the total cost of the call.
For example if the area code is in the array, such as and the call length is minutes, the output should be:
Your phone call to area costs $ per minute
For minutes the total is $
If the area code is not in the array, such as the program should not accept a call length, and instead output Sorry no calls allowed to area
Area Code PerMinute Rate $
Figure Perminute phone call rates
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started