Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Integer arrays memberScores and yearsRegistered are read from input. For each element in yearsRegistered, if an element is greater than 3 0 , output memberScores'

Integer arrays memberScores and yearsRegistered are read from input. For each element in yearsRegistered, if an element is greater than 30, output memberScores' corresponding element followed by a space. After the final output, end with a newline.
Ex: For the input:
7085323325
4610392618
then the output is:
7032 import java.util.Scanner;
public class CombineArrays {
public static void main(String[] args){
Scanner scnr = new Scanner(System.in);
final int NUM_VALS =5;
int[] memberScores = new int[NUM_VALS];
int[] yearsRegistered = new int[NUM_VALS];
int i;
for (i =0; i < NUM_VALS; ++i){
memberScores[i]= scnr.nextInt();
}
for (i =0; i < NUM_VALS; ++i){
yearsRegistered[i]= scnr.nextInt();
}
/* Your code goes here */
}
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is meant by decentralisation of authority ?

Answered: 1 week ago

Question

Briefly explain the qualities of an able supervisor

Answered: 1 week ago

Question

Define policy making?

Answered: 1 week ago

Question

Define co-ordination?

Answered: 1 week ago

Question

What are the role of supervisors ?

Answered: 1 week ago