Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For any element in keysList with a value smaller than 4 0 , print the corresponding value in itemsList, followed by a space. Ex: If
For any element in keysList with a value smaller than print the corresponding value in itemsList, followed by a space.
Ex: If the input is:
the output is:
import java.util.Scanner;
public class Compare
public static void mainString args
final int SIZELIST ;
int keysList new intSIZELIST;
int itemsList new intSIZELIST;
int i;
Scanner input new ScannerSystemin;
keysList input.nextInt;
keysList input.nextInt;
keysList input.nextInt;
keysList input.nextInt;
itemsList input.nextInt;
itemsList input.nextInt;
itemsList input.nextInt;
itemsList input.nextInt;
for i ; i SIZELIST; i
if keysListi
System.out.printitemsListi;
Your code goes here
System.out.println;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started