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
So i'm trying to figure out why this code wont run can anyone help me
MaRussiya [10]

Answer:

<em><u>use</u></em><em><u> </u></em><em><u>the</u></em><em><u> </u></em><em><u>ope</u></em><em><u>ning</u></em><em><u> </u></em><em><u>and</u></em><em><u> </u></em><em><u>cl</u></em><em><u>osing</u></em><em><u> </u></em><em><u>tags</u></em><em><u> </u></em>

<em><u>[</u></em><em><u>Tex]</u></em><em><u> </u></em><em><u>[</u></em><em><u>\</u></em><em><u>t</u></em><em><u>e</u></em><em><u>x</u></em><em><u>]</u></em><em><u> </u></em><em><u>ok</u></em>

8 0
2 years ago
You can use automatic link-checking software to identify invalid hyperlinks. if you find invalid links, what should you do next?
Solnce55 [7]
Correct the href value of the appropriate anchor.
7 0
2 years ago
Explain how communication has helped to the staff in organization to reach their maximum delivery of service with efficience and
Gwar [14]

Answer:

i don't know

Explanation:

6 0
2 years ago
The buttons on a specific tab are organized into logical Ribbons. <br> T<br> F
NeTakaya
I believe the answer would be true
8 0
3 years ago
Read 2 more answers
____________ describes major components that comprise a system, their relationships, and the information the components exchange
inysia [295]

Answer: Software Architecture

Explanation:

Architecture of a software depicts the basic structure of a software system. Software architecture also describes how the structure of a system behaves and creates such structures, where each structure is consists of software components, relations between these components and the characteristics of these components and relations. It gives an abstraction of a system while hiding its implementation details. It provides description about how the elements of a system interact with each other. For example Service Oriented Architecture (SOA) is a software architectural approach in  which the different application components provide services to other components over the network. IT is a collection of services that communicate with each other. These services integrate into distinct software systems which belong to different business domains.

3 0
3 years ago
Other questions:
  • A windows host sends a tcp segment with source port number 1200 and destination port number 25. the sending host is a(n) _______
    10·1 answer
  • Assume that isIsosceles is a bool variable, and that the variables isoCount, triangleCount, and polygonCount have all been decla
    11·1 answer
  • Which resources could be used a lot when installing a desktop app for synchronization purposes? Choose two answers.
    5·1 answer
  • What is the difference between = and == in terms of java..?
    6·2 answers
  • Sometimes a database can contain "bad data," meaning incomplete, incorrect, inaccurate, or irrelevant records, which can be corr
    7·1 answer
  • Do word provides an undo button that can be used to cancel the most recent command or action
    13·1 answer
  • What is the main difference between project tasks and client support tickets?
    11·1 answer
  • PLEASE HURRY!!!!
    8·2 answers
  • 1. A bank customer invested $24 in a bank with 5 percent simple interest per year, write a program the construct a table showing
    11·1 answer
  • Write any two rules for writing algorithm​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!