Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Using C#: The Chat-A-While phone company provides service to six area codes and charges the per-minute rates for phone calls shown in Figure 6-25 (below).

Using C#:

The Chat-A-While phone company provides service to six area codes and charges the per-minute rates for phone calls shown in Figure 6-25 (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 715, and the call length is 22 minutes, the output should be:Your phone call to area 715 costs $0.16 per minute For 22 minutes the total is $3.52

If the area code is not in the array, such as 111, the program should not accept a call length, and instead output Sorry - no calls allowed to area 111.

Area Code Per-Minute Rate ($)
262 0.07
414 0.10
608 0.05
715 0.16
815 0.24
920 0.14

image text in transcribedimage text in transcribed

structions ChatAwhile.cs The Chat-A-While phone company provides service to six area codes and charges the per-minute rates for phone calls shown in Figure 6-25 (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 715, and the call length is 22 minutes, the output should be: Your phone call to area 715 costs For 22 minutes the total is $3.52 Instructions ChatAwhile.cs + If the area code is not in the array, such as 111, the program should not accept a call length, and instead output Sorry - no calls allowed to area 111. Area Code Per-Minute Rate ($) 262 0.07 414 0.10 608 0.05 715 0.16 815 0.24 920 0.14 Figure 6-25 Per-minute phone call rates

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions