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]
4 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]4 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
Td udutdiydiyfyfigciydutdutdtt
luda_lava [24]

hghsFHSkuhsdggewyewGUKweutgqeYFGYhgsukGFwufYHFUKyfukyfeukfrgkufwrGwukfrgtuskgtweYRtueoytewiuWYI7W

5 0
3 years ago
Read 2 more answers
Each character in a string has a(n) _______________ which specifies its position in the string.
-BARSIC- [3]
<span>The string is a sequence of characters.</span><span>
Each character in a string has an index which specifies its position in the string.
</span>The index of the first character is 0, the second character is 1, and so on.The character at the nth position has the index n.

5 0
3 years ago
Item 19 A student pushes a box across a rough horizontal floor. If the amount of work done by the student on the box is 100 J an
tatiyna

Answer:

60 J

Explanation:

Given,

Work done to push the box = 100 J

Energy dissipated by friction = 40 J.

According to work energy theorem work done is equal to change in kinetic energy.

Change in Kinetic energy = Work done by student + Work done by friction

Change in Kinetic energy = 100 J - 40 J

Work done by the friction will be negative because it will act in opposite direction of force applied.

Change in Kinetic energy = 60 J

4 0
4 years ago
A computer science student often uses public forum sites like CodeGuru, DreamInCode and StackOverflow in order to help with lear
il63 [147K]

Answer:

C

Explanation:

You can automatically cross out A, as they do not hinder communication. B can be crossed out as well, since kids should use these websites for help. Using the websites can be beneficial and give a learning edge. D is kind of correct, but isn't the best answer.

C is the answer because the websites are public data. People get on the website for help with certain concepts, and helps identify problems to their solution. <em>(Public data found on these forums provides widespread access to identified problems and their solutions. )</em>

4 0
3 years ago
At one time, a station sign-off test pattern was designed so TV owners could adjust the quality of their picture and sound
mamaluj [8]

Answer:

true

Explanation:

7 0
3 years ago
Other questions:
  • What is heaven backwards?
    11·2 answers
  • What is likely to happen to the economy when there’s too much money or credit circulating?
    13·1 answer
  • a password to a certain database consists of digits that cannot be repeated. if the password is known to consist of at least 8 d
    14·1 answer
  • What are the advantages of using an external style sheet?
    9·1 answer
  • Hey!! Can u help me please!!​
    12·2 answers
  • Assignment Guidelines
    12·1 answer
  • (k + 3)by the power of 3​
    9·1 answer
  • SOMEONE PLEASE HELP ME WITH THIS ILL GIVE YOU BRAINLY IF YOU GET IT RIGHT PLEASE!!!!!
    13·2 answers
  • An alternative to hexadecimal notation for representing bit patterns is dotted decimal notation in which each byte
    11·1 answer
  • What are the nuclear codes?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!