1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
makvit [3.9K]
3 years ago
12

Write a program that use a switch statement whose controlling expression is the variable area code. If the value of area_code is

in the table, the switch statement will print the corresponding city's name to the screen. Otherwise, the switch statement will print the message "Area code not found." to the screen. Use case "fall throughs" in order to simplify the switch block as much as possible.

Computers and Technology
1 answer:
scZoUnD [109]3 years ago
6 0

Answer:

Table for Area codes are not missing;

See Attachment for area codes and major city I used

This program will be implemented using c++ programming language.

// Comments are used for explanatory purposes

// Program starts here

#include <iostream>

using namespace std;

int main( )

{

// Declare Variable area_code

int area_code;

// Prompt response from user

cout<<Enter your area code: ";

cin<<"area_code;

// Start switch statement

switch (area_code) {

// Major city Albany has 1 area code: 229...

case 229:

cout<<"Albany\n";

break;

// Major city Atlanta has 4 area codes: 404, 470 678 and 770

case 404:

case 470:

case 678:

case 770:

cout<<"Atlanta\n";

break;

//Major city Columbus has 2 area code:706 and 762...

case 706:

case 762:

cout<<"Columbus\n";

break;

//Major city Macon has 1 area code: 478...

case 478:

cout<<"Macon\n";

break;

//Major city Savannah has 1 area code: 912..

case 912:

cout<<"Savannah\n";

break;

default:

cout<<"Area code not recognized\n";

}

return 0;

}

// End of Program

The syntax used for the above program is; om

You might be interested in
You can customize backdrops in Scratch, adding text or freestyle drawings over the initial image
sveticcg [70]

Answer:

A. True

Explanation:

ive done this myself

https://scratch.mit.edu/projects/395142260/

3 0
3 years ago
Enrico waited ten years to file a cause of action against Frederico for a breach of contract claim. Frederico can use ______ as
ser-zykov [4K]
Time, due to the amount of time between the initial action and the filing of the report, federico could claim the it didn't happen or something
3 0
3 years ago
What do HIPAA guidelines protect?
Kruka [31]

Answer:

They protect patient medical records im pretty sure

Explanation:

7 0
2 years ago
Please help.
storchak [24]

Hey mate!

Answer:

import java.util.*;

class Max Min

{

public static void main()

{

int a,b,c,x,y,z,m,n;

Scanner in=new Scanner(System.in);

System.out.println("Enter three unequal numbers:");

a=in.nextInt();

b-in.nextInt();

c=in.nextInt();

x=Math.max(a,b);

y=Math.max(b,c);

z=Math.max(c,a);

m=Math.min(x,y);

n=Math.min(z,m);

System.out.printLn("Second Smallest Number is:"+n);

}

}

Explanation:

  1. here scanner class is used
  2. here java.util package is used

<em><u>h</u></em><em><u>o</u></em><em><u>p</u></em><em><u>e</u></em><em><u> </u></em><em><u>it</u></em><em><u> </u></em><em><u>he</u></em><em><u>lped</u></em><em><u> you</u></em><em><u>:</u></em><em><u>)</u></em>

4 0
3 years ago
What should htc's os strategy be? should it stick with windows mobile and android? should htc build its own platform? add/drop o
rosijanka [135]

I say windows, since it is very common.

8 0
3 years ago
Other questions:
  • Ben buys an Olympus E-PL2 from Sony which starts malfunctioning. When he opts for an exchange, the customer representative says
    11·1 answer
  • I only want someones opinion on this not anything you would find in a book.
    7·1 answer
  • Medium-term goals describe what you want your business to achieve (a) in ten years, (b) in terms of market share, (c) in two to
    8·1 answer
  • How do I do a PowerPoint
    10·2 answers
  • What are entity-relationship diagrams and how are they used? What symbol is used for a relationship? What is an associative enti
    5·1 answer
  • Write a method called removeInRange that accepts four parameters: an ArrayList of integers, an element value, a starting index,
    11·1 answer
  • Which tools are found in the Quick Analysis feature? Check all that apply.
    14·2 answers
  • In saving a Visual Basic project properly , which of the following: two components part are involved ?
    6·1 answer
  • According to the video, what is used to create computer programs?
    12·2 answers
  • Where is the third vanishing point in the three point perspective
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!