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
The work day has just started and you receive reports that the inventory management server is not accessible on your company's n
drek231 [11]

Answer:

Option 3 i.e., Server manager is the correct option.

Explanation:

The server manager is the MS windows tool for the purpose to examine and maintain the function of the server and alter the configuration. So, when the user gets the reports of the management server of the inventory or stock which is not usable by the company's server of the following user. Then, he recalls the new admin of the server. The server manager tool should be used by the admin of the server.

7 0
3 years ago
The angles of a quadrilateral are in the ratio 1:2:3:4 what is the largest angle​
zheka24 [161]

Answer:

144°

Explanation:

The sum of the measures of interior angles of a quadrilateral is 360°

The ratio of angle measures is 1:2:3:4

Total ratio = 1+2+3+4=10

The angles will be :

1/10 * 360°= 36°

2/10*360°=72°

3/10*360°=108°

4/10*360°=144°

The largest angle is 144°

7 0
3 years ago
Which of the following correctly describes the syntax of an If statement?
Ber [7]

if(Expression to be tested) {

code to execute

} else if(Expression to be tested) {

code to execute

}


you can have as many else ifs as you want. But that's what it looks like.

8 0
3 years ago
The Bradshaw family has $200,000 of total assets and $140,000 of liabilities. What is their net worth?
3241004551 [841]

Answer:

$340,000 is there net worth

Explanation:

$200,000+ $140,000 = $340,000

5 0
3 years ago
Children may be placed in restraining devices such as high chairs, swings or bouncy seats
Ratling [72]
Yes in my opinion. People will say no but there is no right answer
8 0
2 years ago
Other questions:
  • A(n) ____________________ stores copies of data or programs that are located on the hard drive and that might be needed soon in
    9·1 answer
  • In Microsoft Windows, which of the following typically happens by default when a file is "double-clicked"
    10·2 answers
  • What are three new things in Microsoft Word 2016?
    5·1 answer
  • 1) Why is angle of view important? What are some of the ways that you can do this?
    6·1 answer
  • A user is attempting to format a 4 TB HDD using NTFS but only has the option to format the disk with a size of approximately 2 T
    15·1 answer
  • What are some of the ways you can use bitlocker encryption? (choose all that apply?
    10·1 answer
  • Arrays of structures ________. Group of answer choices None of the above. are automatically passed by reference cannot be passed
    6·1 answer
  • In order to control access to a company's intranet and other internal networks, all communications pass through a _____ server.
    5·1 answer
  • The Internet is a worldwide communications network. Which device connects computer networks and computer facilities?
    11·1 answer
  • In what medium do web applications operate?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!