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
An organization’s IRP prioritizes containment over eradication. An incident has been discovered where an attacker outside of the
emmasim [6.3K]

Answer:

The correct answer is (a) Remove the affected servers from the network.

Explanation:

Solution:

Now, since the organisation top priority is more of  containment over eradication, an outbreak code that is hostile as an can be suppressed effectively by removing the web server completely from the over all network facilities or infrastructure.

Also, if the affected servers are not removed, it might affect the integrity, confidentiality of sensitive materials or documents which will be exposed to the outside world by the attacker.

4 0
3 years ago
What effect does screen resolution have on how graphics are displayed?
posledela
The clearer the resolution screen is it is better seen through the graphics. Say you have a bad computer screen, well your graphics are going to be bad. The better and higher quality it is will be the better you can see your images.
7 0
3 years ago
Use the Internet to gather information on four filesystems compatible with Linux. For each filesystem, list the situations for w
marta [7]
If fhun gftrfjjtcbjjbsufcghtfghyrssfbkoire crazy ahh young man
7 0
3 years ago
6.Which of the following statements illustrates a characteristic of a person's attitudes
OleMash [197]
They act like a filter for info a person receives
8 0
2 years ago
Read 2 more answers
Given a variable s that is associated with the empty string, write some statements that use a while loop to associate s with a s
ArbitrLikvidat [17]

Answer:

Following are the program in the Python Programming Language.

#declare empty string variable

s=""

#declare variable that store "*" as string

x= "*"

#set the while loop

while(len(s) < 777):

   #initialize the value of 'x' in 's'

   s= x

   x += "*"

Explanation:

<u>Following are the description of the program</u>.

  • Set an empty variable to store the string type values.
  • Again, set a variable 'x' and initialize asterisks in it as a string.
  • Set the while loop that iterate, when the length of the variable 's' is less than 777, then initialize the value of the variable 'x' in the variable 's' and concatenate asterisks with the variable 's'.
8 0
3 years ago
Other questions:
  • The answer for this question?
    5·1 answer
  • On a spreadsheet, this is the term for a grouping of cells that touch each other and form a rectangle. An example of it would be
    13·1 answer
  • Your friend sees an error message during Windows startup about a corrupted bootmgr file. He has another computer with a matching
    12·1 answer
  • Which of the following types of network can only be accessed by members within a private organization?
    5·1 answer
  • Which command compiles the Java source code file Welcome.java?
    11·1 answer
  • If you give an actual answer I'll give brainliest​
    13·2 answers
  • One key feature of malware is that it:
    13·1 answer
  • What helps you evaluate websites for reliable information?
    15·2 answers
  • Juan has performed a search on his inbox and would like to ensure the results only include those items with attachments which co
    14·2 answers
  • balance exercises used for introducing balance training should initially involve little joint motion and improve what type of co
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!