subject

Given a long long integer representing a 10-digit phone number, output the area code, prefix, and line number using the format (800) 555-1212 Ex: If the input is: 8005551212 the output is: (800) 555-1212 Hint: Use the modulo operator (%) 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 0119998888 is not allowed. LAB ACTIVITY 2.26.1: LAB: Phone number breakdown 0/10 main. c Load default template... 1 #include 2 3 int main(void) { 4 long long phoneNumber; 5 /* Add more variables as needed */ 6 7 8 scanf("%11d", &phoneNumber); 9 /* Type your code here. */ 10 11 return 0; 12 13

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:20
Write a method replacekey in the minheap class with the following signature: public void replacekey(integer oldkey, integer newkey) the method will replace the first occurrence of oldkey with the newkey, and restore the min-heap property after the change. if the oldkey does not exist in the heap, the method prints an appropriate message and returns without changing the heap. example: suppose our binary heap object (bh) has the following keys: *** 4 6 7 32 19 64 26 99 42 54 28 then the method call: bh.replacekey (oldkey integer(54), newkey integer(2))
Answers: 1
question
Computers and Technology, 23.06.2019 18:50
What is transmission control protocol/internet protocol (tcp/ip)? software that prevents direct communication between a sending and receiving computer and is used to monitor packets for security reasons a standard that specifies the format of data as well as the rules to be followed during transmission a simple network protocol that allows the transfer of files between two computers on the internet a standard internet protocol that provides the technical foundation for the public internet as well as for large numbers of private networks
Answers: 2
question
Computers and Technology, 24.06.2019 12:30
Nikki sent flyers in the mail to all houses within the city limits promoting her computer repair service what type of promotion is this and example of
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
In a home that has 120 v service, there is an electric appliance that has a resistance of 12 ohms. how much power will this appliance consume? a. 10 w b. 120 w c 1200 w d. 1440 w
Answers: 1
You know the right answer?
Given a long long integer representing a 10-digit phone number, output the area code, prefix, and li...
Questions
question
Mathematics, 02.03.2020 01:35
question
Mathematics, 02.03.2020 01:35
question
Mathematics, 02.03.2020 01:35
question
Mathematics, 02.03.2020 01:36
Questions on the website: 13722361