subject

Phone number breakdown. Given an integer representing a 7-digit phone number, excluding the area code, output the prefix and line number, separated by a hyphen.
Ex: If the input is 5551212, the output is:
555-1212
Hint: Use % to get the desired rightmost digits. Ex: The rightmost 2 digits of 572 is gotten by 572 % 100, which is 72.
Hint: Use / to shift right by the desired amount. Ex: Shifting 572 right by 2 digits is done by 572 / 100, which yields 5. (Recall integer division discards the fraction).
For simplicity, assume any part starts with a non-zero digit. So 011-9999 is not allowed.
must be written in coral language

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:00
How can i clip a picture to a question on the computer?
Answers: 1
question
Computers and Technology, 22.06.2019 08:00
Aplan to budget time for studying and activities is referred to as a study routine. study habits. study skills. a study schedule.
Answers: 1
question
Computers and Technology, 22.06.2019 12:30
Some of the first computer games were created in the early 1970s by college students experimenting after hours to see what the were capable of doing.
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the
Answers: 1
You know the right answer?
Phone number breakdown. Given an integer representing a 7-digit phone number, excluding the area co...
Questions
question
English, 08.04.2020 06:38
question
Mathematics, 08.04.2020 06:38
question
History, 08.04.2020 06:38
question
Mathematics, 08.04.2020 06:38
question
Mathematics, 08.04.2020 06:39
Questions on the website: 13722360