Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5 2 8 0 4 0 . 3 4 8 9 5 2 8 . 9 3 z q y 7 Jump to level 1

528040.3489528.93zqy7
Jump to level 1
Integer arrays employeelDs and employeeAges are read from input, containing the IDs and ages of each employee. Initialize variable count with 0. For each employee, increment count if an employee meets both of the following conditions:
ID is greater than 150.
Age is less than 30.
Lastly, output count followed by a newline.
Ex: For the input:
{:[177,127,189,103,129,182]
{:[11,32,29,44,33,17].
then the output is:
3
int[] employee-IDs = new int [NUM_VALS];
int [] employeeAges = new int [NUM_VALS];
int i;
int count;
for NUM_VALS; ++i){
}
employeeIDs [i]=scnr*nextInt();
for NUM_VALS; ++i){
employeeAges [i]=scnr. nextInt () ;
}
Y** Your code goes here */
}
}
image text in transcribed

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_2

Step: 3

blur-text-image_3

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