Write a program that simulates the dial of a phone number

Assignment Help C/C++ Programming
Reference no: EM13936829

Write a program that simulates the dial of a phone number. The program will accept a phone number as input, and it will acknowledge the call by either writing an error message or the 8 digit phone number to the console window. The phone number may have either digits, letters, or both.

Here are the letters associated with each digit.

0 5 J K L
1 6 M N O
2 A B C 7 P Q R S
3 D E F 8 T U V
4 G H I 9 W X Y Z

A phone number never begins with a 0 or 555, so the program should flag an error if such a number is entered. A phone number always has a hyphen (-) in the 4th position. If a hyphen is in any other position, it is considered an invalid digit. If the phone number is valid, write the converted number to the output file.

The program should process any number of phone numbers until the user enters a Q.

Please refer to the attachment for sample input-output session with the program, and the pseudo code, using which the C++ code has to be written for this simulation.

Attachment:- Program pseudocode.docx

Reference no: EM13936829

Questions Cloud

Compute the initial investment cash outlay : Compute the initial investment cash outlay. This is the total cost of equipment purchase ($285,000), installation and shipping ($25,000), and change in net working capital
Why is dna evidence more useful as exclusionary evidence : Give the DNA sequence for the template strand that gives rise to the following sequence gel, prepared using the sanger method with a radioactive label at the 5' end of the primer.
Results of the query into an ms word file : What to Turn in: Document all of your SQL scripts by copying the script and the results of the query into an MS Word file. As with the previous assignment, please include a listing of the data in each table and the table fields (i.e., use the SELE..
Develop a consumer behaviour report : Students are required to develop a Consumer Behaviour Report to be submitted to the Managing Director of a Medium to High Involvement Brand/Product of your choice to outline the key issues facing the company in terms of consumer behavioural issues..
Write a program that simulates the dial of a phone number : Write a program that simulates the dial of a phone number. The program will accept a phone number as input, and it will acknowledge the call by either writing an error message or the 8 digit phone number to the console window. The phone number may..
List the stages of pcr and describe the function of each : How is PCR used to determine that a person is infected with a specific bacterium? Now that we have PCR, why would we use culture techniques?
Describe the company and product : 1. Describe the company and product? 2. You don't have to choose very luxury products? 3. Who sale it or use it in Afghanistan?
Makes use of information technologies and systems : Make contact with an organisation that makes use of information technologies and systems (but not University of Salford or The Manchester College).
Calculate the net benefit or cost to turun telelaitos : Calculate the net benefit or cost to Turun Telelaitos from implementing a JIT production system. What other non-financial and qualitative factors should Turun Telelaitos consider before deciding on whether it should implement a JIT system?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create an object oriented solution customer to purchase

Create an object oriented solution that allows a customer to purchase between 1 and 3 pizzas, add toppings to each pizza, if desired, and then displays a receipt, including the details for each pizza, a pretax total amount, and a grand total amoun..

  By a minimal interpretation that makes a formula

By a minimal interpretation that makes a formula true, we mean that if one atom is removed from the interpretation then the resulting interpretation does no longer make the formula true.

  Write a function that collects integers from the user

Write a function that collects integers from the user until a 0 is encountered and returns them in a list in the order they were input (ML only).

  If a class is derived protected

If a class is derived protected from a base class, explain how this affects the inheritance of all public, protected, and private members of the base class by the derived class.

  What is the output

What is the output - This one is complex and I don't know how to do it

  Write a pseudocode statement

Assume that a program has two string variables named str1 and str2. Write a pseudocode statement that assigns an all uppercase version of str1 to the str2 variable. is str.add(str1,str2) part of it?

  Implement a append function

Write and test the following function: void append(int a[], int m, int b[], int n); The function appends the first n elements of the array b onto the end of the first m elements of the array a.

  Write a pseudo code and perform algorithm analysis

Write a pseudo code and perform algorithm analysis to show the complexity is Log N - Suppose that you have an N-story building and plenty of eggs.

  Omaha foods manufacturescorn meal in a continuous

Omaha Foods manufacturescorn meal in a continuous, mass production process. Corn is added at the beginningof the process. Normal losses are minimal and abnormal losses infrequentlyoccur when foreign materials are found in the corn meal. Routine inspe..

  Describe floyd''s algorithm finds the shortest paths

A shortest path between vertex a and b is a path with the minimum sum of weights of the edges on the path. Floyd's algorithm finds the shortest paths of all vertex pairs of a graph.

  What is a cell reference

What is a cell reference (also called a cell address) and what is the significance of being able to use them in spreadsheet formulas?

  An assembly program to determine the price of a car rental

an Assembly program to determine the price of a car rental

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd