Enter a telephone number expressed in letters

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

To make telephone numbers easier to remember, some companies use digits and letters (or only letters) to show their telephone number. In some cases, to make a telephone number meaningful, companies might use more than seven digits and letters. Here are some examples:

Phone Number in Display Note Actual Phone Number

Get Loan - 438-5626

Call Home More than 7 digits 255-5466

111 GOLD - 111-4653

Glass4u - 452-7748

Compose a program that prompts the user to enter a telephone number expressed in letters (or digits and letters) and outputs the corresponding telephone number in digits. If the user enters more than seven characters, then process only the first seven valid digits. Also output a - (hyphen) after the third digit. Allow the user to use digits, both uppercase and lowercase letters, and spaces between words.

If a number contains invalid letters such as a number GOT $$99, your program should report and terminate the processing of that phone number (do not terminate the whole program) and ask for another number. Your program should process as many telephone numbers as the user wants. You may use any valid approach to allow multiple sessions until user chooses to stop, such as CTRL+Z, enter y/n, enter q and so on. Whatever approach you use, provide proper prompt message(s) to users so they know how to use your program.

Reference no: EM132432167

Questions Cloud

Information about the genres of music customers : Information about the genres of music customers have purchased in the past and would offer those discounts on new releases in those genres.
How can you improve the efficiency of a nested condition : How can you improve the efficiency of a nested condition. Discuss why it is important to use meaningful names for identifiers.
What is the significance of the pie : Differentiate between lines of decent and residence. Why is it important to examine them? 3. What do you understand by the concept of cultural capital?
Prepare a statement of comprehensive income : An unrealized loss of $76,000 on available-for-sale securities. Prepare a statement of comprehensive income, beginning with income from continuing operations
Enter a telephone number expressed in letters : Compose a program that prompts the user to enter a telephone number expressed in letters (or digits and letters) and outputs the corresponding telephone number
Role of a parameterized type in function templates : What is the role of a parameterized type in function templates? May I have an example that illustrates specifying a parameterized type for a function template.
Soc 3362 - sociology of religion in india assignment : SOC 3362 - SOCIOLOGY OF RELIGION IN INDIA Assignment help and solutions:- Discuss how religious conversions can impact the social fabric of Indian society
Prepare a horizontal analysis of the balance sheet data : Prepare a horizontal analysis of the balance sheet data for Nike, using 2019 as a base. (Show the amount of increase or decrease as well.)
Implement the euclid algorithm in c : Implement the Euclid algorithm in C++ (or Java). After that, add the code to display the number of modulus operation(s) for the numbers m and n in the ranges

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Change this code to read in strings from a text file

code takes in a string from a user, checks if the paranthesis are ballanced (as defined by my class) and also returns the variable from my line (also from my class). All like to change this code to read in strings from a text file (each line is a str..

  Program to next the loops in either direction

You can write your program to next the loops in either direction, that is, process row-by-row or column-by-column. Explain which way you would choose to process the data.

  Describe virtual memory

Compare and Contrast Dynamic vs Static memory and where in RAM memory each type of structure is placed. Describe Virtual Memory.

  Economy of kenya has a budget deficit

The economy of Kenya has a budget deficit of KSH 500B. This deficit is likely to be funded through domestic borrowing and taxation. Using an appropriate model, explain the macroeconomic implications of such a move.

  Code program using structure named movie data

Code program using structure named Movie Data to store the following information about a movie:

  Generates numbers in the fibonacci sequence

Write a class called fibs that generates numbers in the Fibonacci sequence (each number is the sum of the previous two). The sequence starts 1, 1, 2, 3, 5, ...

  Write a program to calculate existing angles

Write a program to calculate existing angles and do if and then from this, and to place fixed angles at certain position.

  Determine the best threshold size for the combined

Design an experiment to determine the best threshold size for the combined "quicksort-plusinsertion-sort" implementation. You'll need to consider a range of data sizes, including both random and "worst-case" data sets.

  Write a c-c++ function that accepts an integer number

Write a C/C++ function that accepts an integer number as parameter and returns a number of which the order of its digits have been reversed.

  Features with the real life scenarios

Explain any three features that must be implemented by the application that will be created by WebSoft Solutions Pvt. Ltd. Support your answer with suitable examples. Relate the features with the real life scenarios.

  State whether the following are valid switch statements

State whether the following are valid switch statements. If not, explain why. Assume that n and digit are int variables.

  What is a copy constructor in c

What is a copy constructor in C++? How it is declared? Explain with a suitable example. How can the unary operator ++ be overloaded in C++ for postfix operation? Demonstrate with a suitable example

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