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]
1 year 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]1 year 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
Modern operating systems decouple a process address space from the machine’s physical memory. List two advantages of this design
kolbaska11 [484]

Answer: Decoupling action of the process address space refers to the physical memory of the device getting decoupled to provide  address translation in automatic way. The benefit of this method is as follows:-

  • Faster starting up of the program
  • The physical address space gets managed on its own
  • Helps in execution of large program when the main memory of the machine is of  smaller size in comparison with program

7 0
2 years ago
A data scientist is writing a Machine Learning (ML) algorithm using a large data set.
Olenka [21]

The product of the data scientist, who writes a Machine Learning (ML) algorithm using a large data set, is called a data-driven model.

A data-driven model generates insights and increases the efficiency of decision-making.

This implies that decisions are made based on the insights that the model by the Machine Learning algorithm produces.

Thus, Machine Learning algorithm or code helps entities to make insightful business decisions to increase efficiency and effectiveness.

Learn more about Machine Learning here at brainly.com/question/23738591

4 0
1 year ago
Jason is working on a web page that includes Q&amp;A interactions. Which option should Jason select to engage users in the inter
Vaselesa [24]
E should be the correct answer
0 0
1 year ago
Read 2 more answers
A ______________ deals with the potential for weaknesses within the existing infrastructure to be exploited.
algol [13]

Answer:

Threat assessment

Explanation:

A threat assessment deals with the potential for weaknesses within the existing infrastructure to be exploited.

Threat Assessment is further explained as the practice of determining or ascertaining the credibility and seriousness of a potential threat, and also the probability or chases of the threat will becoming a reality.

Threat assessment is separate to the more established procedure of violence-risk assessment, which seek to forcast an individual's general capacity and tendency to respond to situations violently. Instead, threat assessment aims to interrupt people on a route to commit "predatory or instrumental violence, the type of behavior connected with targeted attacks".

3 0
2 years ago
Read 2 more answers
Brake lights on freeways invite A: law enforcement B: panic C: sudden lane changing D: both B and C E: positive driving habits
Nuetrik [128]
I'am sorry i'am speak spanish

8 0
1 year ago
Other questions:
  • What helps companies and organizations to target masses of people, provide 24/7 services, and deliver better marketing in a chea
    13·2 answers
  • Copy the 10 statements as they appear below into your journal.
    6·2 answers
  • An electronics store purchased a CD player at a wholesale price of $60 and then sold it at a 40 percent discount off the origina
    13·1 answer
  • Which of these words could byte pair encoding compress the most?
    13·1 answer
  • As you are planning your informative speech on the prevalence of Internet memes in pop culture and you wonder if your audience w
    14·1 answer
  • A program needs to allow a customer to input integers until the input number is zero. When the input number is zero, the program
    14·1 answer
  • FTP requires confirmation that a file was successfully transmitted to a client, but it has no built-in mechanism to track this i
    5·1 answer
  • Some early computers protected the operating system by placing it in a memory partition that could not be modified by either the
    5·1 answer
  • Probability of theft in an area is 0.03 with expected loss of 20% or 30% of things with probabilities 0.55 and 0.45. Insurance p
    5·1 answer
  • The code below assigns the 5th letter of each word in food to the new list fifth. However, the code currently produces errors. I
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!