subject

Multiply each element in origList with the corresponding value in offsetAmount. Print each product followed by a space.
Ex: If origList = {4, 5, 10, 12} and offsetAmount = {2, 4, 7, 3}, print:

8 20 70 36
import java. util. Scanner;

public class VectorElementOperations {
public static void main (String [] args) {

final int NUM_VALS = 4;
int[] origList = new int[NUM_VALS];
int[] offsetAmount = new int[NUM_VALS];
int i;

origList[0] = 20;
origList[1] = 30;
origList[2] = 40;
origList[3] = 50;

offsetAmount[0] = 4;
offsetAmount[1] = 6;
offsetAmount[2] = 2;
offsetAmount[3] = 8;

/* Your solution goes here */

System. out. println("");
}
}

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 12:40, melaniem50
Curriculum exam to process a resident's payment, you must click on onesite payments home page. from the a. reports b. my settings o c. transactions o d. rent tab
Answers: 1
image
Computers and Technology, 23.06.2019 18:00, taiyana74
Ramona enjoys her job because she is able to kids in an after school program. the work value ramona feels strongest about is a. leadership b. risk c. independence d. work with people select the best answer from the choices provided a b c d
Answers: 1
image
Computers and Technology, 24.06.2019 17:30, bxbykay1
Looking at the electroscope, describe how you can cause the two leaves at the bottom to repel each other and stay that way
Answers: 3
image
Computers and Technology, 24.06.2019 22:00, sierrawalk2283
True or false technology is often discovered by accident
Answers: 2
You know the right answer?
Multiply each element in origList with the corresponding value in offsetAmount. Print each product f...

Questions in other subjects: