1answer.
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
satela [25.4K]
2 years ago
15

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:
oee [108]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
Carlie was asked to review a software project for her company to determine specific deadlines. Which part of project management
Elis [28]

Answer:

Resources

Explanation:

Carlie certainly requires to review the resources. It is important to find out how many software engineers, testers, etc. are available. And only then Carlie can find out the exact deadlines as required here. And hence, she must have look at the resources while determining the specific deadlines. Hence, resources are the correct option.

3 0
3 years ago
Read 2 more answers
What is the difference<br> difference between<br> Open<br> and recent<br> command?
Nostrana [21]
The difference between the new and open commands on the file menu are quite simple. The new command creates a brand new file, while the open command opens a file that already exists or has been created.
3 0
3 years ago
Which of the following is NOT a popular computer programming
cestrela7 [59]
Answer is Xero. All the other Languages are Popular and Widely Used.
Thank You!
6 0
2 years ago
When creating a user generated function, what procedure is followed?
marin [14]

When creating a user-generated function, what procedure is followed d) all of the above.

<h3>What are the three factors of user-described characteristic?</h3>

A user-described characteristic has 3 essential additives which might be characteristic declarations, characteristic definition and characteristic called.

The characteristic prototypes are used to inform the compiler approximately the variety of arguments and approximately the specified datatypes of a characteristic parameter, it additionally tells approximately the go-back kind of the characteristic. By this information, the compiler cross-assessments the characteristic signatures earlier than calling.

Read more about the prototype :

brainly.com/question/7509258

#SPJ1

6 0
1 year ago
What is the default delay before scripts are executed?
kenny6666 [7]
Answer is 5 minutes

The default value for windows 8.1 joined to a server 2003 domain logon scripts delays is not configured. However, the windows 8.1 may have a delay processing logon scripts of 5 minutes. The script does not execute until 5 minutes are over. Users have a Group policy applied to them that is used to assign a logon script.


8 0
2 years ago
Other questions:
  • What does sampling accomplish? Choose all that
    11·1 answer
  • If you wanted a computer to store a variable with the content of “110 Maple Street,” which data type would be most appropriate?
    15·2 answers
  • What is the importance of eliminating marks that classify a master key
    7·1 answer
  • Define a method printFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand. End with a n
    7·2 answers
  • Which of the following accessories would you use to create a drawing? A. Calculator B. Notepad C. Paint D. WordPad
    14·2 answers
  • From space, the world looks very different. Describe what these surfaces look like from an airplane’s view:
    13·2 answers
  • Which of the following is used to move to end of the row?​
    8·1 answer
  • Is a collection of information stored under a single nam​
    6·2 answers
  • The function below takes two arguments: a string (name) and an integer (position). Complete the function so that it prints out t
    7·1 answer
  • What's the best item in the binding of isaac?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!