subject

Overview Create a program that will use functions to break down a 10-digit phone number. Objectives To get experience manipulating strings To get experience defining a function To get experience calling the function with user supplied arguments To get experience using the return value of the function Description Refer back to your lab 6C where you were able to accept input representing a 10-digit phone number and generate an output with the area code, sourrounded by parentheses, then a space, then the prefix, and line number, separated by hyphens. For this lab, you will use the following functions to accomplish the same formatted output, given the same 10-digit input: get_area_code(ten_digit_number) -- which will return the area code only, no space or parentheses get_prefix(ten_digit_number) -- which will return the prefix only, no space or hyphen get_line_number(ten_digit_number) -- which will return the line number only, no space or hyphen Example of the program The following program reads 10 digits as a phone number and generates a formatted output. For example if the user enters: 8772692967, then the output will be: (877) 269-2967 Please enter 10 digits: 8005551212 Here is your formatted phone number: (800) 555-1212 LAB

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
Program description: a c# app is to be created to produce morse code. the morse code assigns a series of dots and dashes to each letter of the alphabet, each digit, and a few special characters (such as period, comma, colon, and semicolon). in sound-oriented systems, the dot represents a short sound and the dash represents a long sound. separation between words is indicated by a space, or, quite simply, the absence of a dot or dash. in a sound-oriented system, a space is indicated by a short period of time during which no sound is transmitted. the international version of the morse code is stored in the data file morse.txt.
Answers: 3
question
Computers and Technology, 22.06.2019 20:00
What is the term for water wave that is created by an underwater earthquake
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Spoons are designed to be used for: spring hammering. applying body filler. identifying high and low spots. sanding highly formed areas.
Answers: 3
question
Computers and Technology, 23.06.2019 22:50
What is an rss reader used for? for creating a user account on a social new site
Answers: 2
You know the right answer?
Overview Create a program that will use functions to break down a 10-digit phone number. Objectives...
Questions
question
Mathematics, 19.01.2021 23:20
question
Mathematics, 19.01.2021 23:20
question
Mathematics, 19.01.2021 23:20
question
Mathematics, 19.01.2021 23:20
question
English, 19.01.2021 23:20
question
Geography, 19.01.2021 23:20
Questions on the website: 13722363