answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ivenika [448]
2 years ago
14

Multiply each element in origList with the corresponding value in offsetAmount. Print each product followed by a semicolon (no s

paces). Ex: If the input is: 4 5 10 12 2 4 7 3 the output is: 8; 20;70; 36; 1 #include 2 3 int main(void) { 4 const int NUM_VALS = 4; 5 int origList[NUM_VALS]; 6 int offsetAmount [NUM_VALS]; 7 int i; 8 9 scanf("%d", &origList[0]); 10 scanf("%d", &origList[1]); 11 scanf("%d", &origList[2]); 12 scanf("%d", &origList[3]); 13 14 scanf("%d", &offsetAmount[0]); 15 scanf("%d", &offsetAmount[1]); 16 scanf("%d", &offsetAmount[2]); 17 scanf("%d", &offsetAmount[3]); 18 19 \* Your code goes here */ 20 21 printf("\n"); 22 23 return 0; 24
Computers and Technology
1 answer:
Pavlova-9 [17]2 years ago
5 0

Answer:

Replace /* Your code goes here */  with

for(i =0; i<NUM_VALS; i++) {

    printf("%d", origList[i]*offsetAmount[i]);

printf(";");

}

Explanation:

The first line is an iteration statement iterates from 0 till the last element in origList and offsetAmount

for(i =0; i<NUM_VALS; i++) {

This line calculates and print the product of element in origList and its corresponding element in offsetAmount

    printf("%d", origList[i]*offsetAmount[i]);

This line prints a semicolon after the product has been calculated and printed

printf(";");

Iteration ends here

}

You might be interested in
Viet drives around and checks meters to document the amount of electricity used in homes. What Energy pathway is he a part of? E
Svet_ta [14]
As Viet drives around and checks meters to document the amount of electricity used in homes he would be part of the energy distribution process since the electricity is distributed off  a power line into the house and then within the house by the wiring to the lights and the electrical outlets for usage by the inhabitants.
7 0
2 years ago
Read 2 more answers
. Question 2 Fill in the blank: R Markdown notebooks can be converted into HTML, PDF, and Word documents, slide presentations, a
Levart [38]

R markdown notebook describes a notebook format in R programming which supports R programmers to run codes while also writing documents or explanation alongside. Hence, the missing option is Dashboard.

  • R markdown may be compared to jupyter notebooks which also supports writing in markdown language.

  • The R markdown notebooks can be created using the R studio, which allows the conversion notebooks of these notebooks into several different formats including the creation of dashboards.

Hence, R markdown notebooks can be converted to <em>HTML</em><em> </em><em> </em><em> </em><em>PDF</em><em>,</em><em> </em><em>word</em><em> </em><em>document</em><em>,</em><em> </em><em>slide</em><em> </em><em>presentation</em><em> </em><em>and</em><em> </em>dashboards.

Learn more :brainly.com/question/25575402

3 0
2 years ago
Consider whether there are additional components that could be added to the IPv4 protocol to enhance its usefulness. What are th
geniusboy [140]

Answer:

There are no additional components that can be added to the IPv4 protocol to improve its utility

Explanation:

The IPv4 protocol was developed in 1983 and is still the most widely used version worldwide. It consists of a 32-bit binary number that is normally represented in decimal notation, with four digits separated by dots that take values between 0 and 255.

This system limits the IPv4 protocol to 4,000 million different addresses, a figure that in the eighties seemed sufficient but that in practice has been scarce due to the revolution of mobile devices and the impending development of the Internet of Things ( IoT) that will trigger the number of devices connected to the network.

So, there are no additional components that can be added to the IPv4 protocol to improve its utility, since the world is running out of IPv4 addresses and is being replaced by IPv6.

Hope this helps!

5 0
2 years ago
What are the results of Maya’s conspicuous consumption? Check all that apply. - a lack of debt - stress about paying bills - a l
kifflom [539]

Answer:

stress about paying bills

a lack of money for other expenses

great electronic connectivity

Explanation:

The Maya classic period has seen the rise of conspicuous and mass consumption. In the given scenario all the expense her paid by credit cards and cash is rarely used. There will be a stress for paying bills. There will be lack of money available in hand for some routine expenses and mandatory purchases. It gives a great electronic connectivity. All the funds are considered as safe.

4 0
2 years ago
Which of the following would be a considered a want rather than a need for most people?
UNO [17]

c. would be the best answer.


3 0
2 years ago
Other questions:
  • In response to a recent outbreak of computer viruses, Babbage Industries, a large technology company, installs computer virus pr
    7·2 answers
  • The function below takes two arguments, a dictionary called dog_dictionary and a list of dog names (strings) adopted_dog_names.
    8·1 answer
  • Which of the following facts determines how often a nonroot bridge or switch sends an 802.1D STP Hello BPDU message?
    14·1 answer
  • PC’s &amp; More has shifted to sales and service of laptops and PCs, where it has the potential to triple the number of its cust
    14·1 answer
  • Print "userNum1 is negative." if userNum1 is less than O. End with newline Convert userNum2 to 0 if userNum2 is greater than 8.
    10·1 answer
  • In this assignment, you are provided with almost-working code that establishes a TCP socket connection over the INET domain (tho
    11·1 answer
  • Consider the following 3-PARTITION problem. Given integers a1; : : : ; an, we want to determine whether it is possible to partit
    10·1 answer
  • Dawn needs to insert a macro into a Word document. Where can she find the Insert Macro dialog box?
    11·1 answer
  • To reduce costs and the environmental impact of commuting, your company decides to close a number of offices and to provide supp
    14·1 answer
  • 4. Word Separator:Write a program that accepts as input a sentence in which all of thewords are run together but the first chara
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!