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
A structure that organizes data in a list that is commonly 1-dimensional or 2-
kobusy [5.1K]

Answer:

An array.

Explanation:

An array can be defined as a structure that organizes data in a list that is commonly 1-dimensional or 2-dimensional.

Simply stated, an array refers to a set of memory locations (data structure) that comprises of a group of elements with each memory location sharing the same name. Therefore, the elements contained in array are all of the same data type e.g strings or integers.

Basically, in computer programming, arrays are typically used by software developers to organize data, in order to search or sort them.

Binary search is an efficient algorithm used to find an item from a sorted list of items by using the run-time complexity of Ο(log n), where n is total number of elements. Binary search applies the principles of divide and conquer.

In order to do a binary search on an array, the array must first be sorted in an ascending order.

Hence, array elements are mainly stored in contiguous memory locations on computer.

6 0
2 years ago
Why does fiber optic communication technology have a significant security advantage over other transmission technology? higher d
erik [133]
Higher data rates can be transmitted Hope this helps!
7 0
3 years ago
what is an open-source physical computing platform that can take input from a variety of switches or sensors to control physical
stepan [7]

An open-source physical computing platform that can take input from a variety of switches or sensors to control physical objects is known as Arduino.

Arduino means an electronics prototyping system is built to simplify microcontroller projects. The concept is to product these projects without having to know much about microcontrollers or programming, microcontrollers for dummies is one tips of explaining Arduino. Arduino has function to control of traffic lights, it can also be used for the real time control system with programmable timings, pedestrian lighting etc. Arduino can respond with buttons, LEDs, motors, speakers, GPS units, cameras, the internet, and even your smart-phone or your TV.

Learn more about Arduino at brainly.com/question/13098809

#SPJ4

4 0
11 months ago
A personal academic plan is a set of goals relating to the things you want to accomplish while you are in school.
Alex787 [66]

Answer:

True

Explanation:

8 0
2 years ago
PLEASE HELP QUICKLY, I WILL GIVE BRAINLIEST TO THE BEST ANSWER!
dmitriy555 [2]

Answer:

If there are multiple schools in the teams table with the same name, each one of those rows will get joined to matching rows in the players table.

Explanation:

the answer must be match join?

6 0
3 years ago
Other questions:
  • Today, air travel allows large numbers of people to move quickly over long distances. Which of the following is a likely effect
    8·1 answer
  • You have received several trouble tickets from the employees in the warehouse for the stand-alone computers used to control vari
    14·1 answer
  • Digital dashboards provide the decision makers with a quick overview of key performance indicators and other key operational sta
    13·1 answer
  • An organization has a website with a guest book feature, where visitors to the web site can input their names and comments about
    10·2 answers
  • HELP FOR JAVASCRIPT: 01. What is prototypical inheritance? 02. How can JavaScript be used to improve accessibility on the web? I
    6·1 answer
  • The operating cost of driving include
    11·1 answer
  • KAPWING Video Editing Software allows you to use existing You Tube Videos in your design.
    8·1 answer
  • MODS ONLY answer this, I have something for you. I'm reporting this to make it easier
    14·1 answer
  • PLZZZ HELP MEE i need it done today
    7·1 answer
  • A serial schedule:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!