Question: 5 2 8 0 4 0 . 3 4 8 9 5 2 8 qx 3 zqy 7 Integer arrays originalArray and offsetArray are read

528040.3489528 qx3zqy 7
Integer arrays originalArray and offsetArray are read from input, each containing five elements. Update each element in originalArray with originalArray's element multipled by the corresponding element in offsetArray.
Ex: If the input is:
\table[[40,50,20,55,45],[25,35,30,10,60]]
then the output is:
1000,1750,600,550,2700
import java.util.Scanner;
public class Computeoffset {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
final int NUM_VALS =5;
int [] originalArray = new int[NUM_VALS];
int [] offsetArray = new int[NUM_VALS];
int i;
for NUM_VALS; ++i){
originalArray [i]=scnr. nextInt () ;
}
for NUM_VALS; ++i){
offsetArray [i]=scnr*nextInt();
}
 528040.3489528 qx3zqy 7 Integer arrays originalArray and offsetArray are read from

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!