subject

Many companies use telephone numbers like 555-GET-FOOD so the number is easier for their customers to remember. On a standard telephone, the alphabetic letters are mapped to numbers in the following fashion: A, B, and C = 2 D, E, and F = 3 G, H, and I = 4 J, K, and L = 5 M, N, and O = 6 P, Q, R, and S = 7 T, U, and V = 8 W, X, Y, and Z = 9 Write a program that asks the user to enter a 12-character telephone number in the format: XXX-XXX-. Acceptable characters (X's) are A-Z and a-z. Your program should check for: The length of the phone number is correct. The dashes are included and are in the correct positions. There are no characters in the illegal characters in the string. The application should display the telephone number with any alphabetic characters that appeared in the original translated to their numeric equivalent. If the input string is not entirely correct then you should print an error message. For example, if the user enters 555-GET-FOOD the program should display 555-438-3663. If the user enters 123-456-7890, the program should display 123-456-7890. Rules: You must have one function (in addition to main()) that converts an alphabetic character to a digit. Or you can have one function that coverts all characters to digits. You can make your own function or use a built-in function if one exists.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:40
Match the personality traits with their description
Answers: 2
question
Computers and Technology, 22.06.2019 12:50
You have just been hired as an information security engineer for a large, multi-international corporation. unfortunately, your company has suffered multiple security breaches that have threatened customers' trust in the fact that their confidential data and financial assets are private and secured. credit-card information was compromised by an attack that infiltrated the network through a vulnerable wireless connection within the organization. the other breach was an inside job where personal data was stolen because of weak access-control policies within the organization that allowed an unauthorized individual access to valuable data. your job is to develop a risk-management policy that addresses the two security breaches and how to mitigate these risks.requirementswrite a brief description of the case study. it requires two to three pages, based upon the apa style of writing. use transition words; a thesis statement; an introduction, body, and conclusion; and a reference page with at least two references. use a double-spaced, arial font, size 12.
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Match the following. 1. show grouping of word processing tasks that can be performed quick access toolbar 2. shortcut location for commonly used elements scroll bars 3. organized commands used to modify documents ribbon 4. used to align and measure content in a word screen zoom bar 5. vertical and horizontal bars that are used to navigate through a document contextual tabs 6. displays the name of the document in use ruler 7. allows users to enlarge or shrink a visual of a word document title bar
Answers: 2
question
Computers and Technology, 23.06.2019 07:50
Apython programming question: assume s is a string of lower case characters. write a program that prints the number of times the string 'bob' occurs in s. for example, if s = 'azcbobobegghakl', then your program should print number of times bob occurs is: 2
Answers: 3
You know the right answer?
Many companies use telephone numbers like 555-GET-FOOD so the number is easier for their customers t...
Questions
question
Mathematics, 30.03.2020 23:44
question
Mathematics, 30.03.2020 23:44
question
Mathematics, 30.03.2020 23:44
question
Mathematics, 30.03.2020 23:45
Questions on the website: 13722362