Question: 5 2 8 0 4 0 . 3 4 8 9 5 2 8 . 9 3 2 9 y 7 Jump to level 1
Jump to level
Integer arrays busNumbers and numPeople are read from input, containing the numbers and number of people of each bus. Initialize variable count with For each bus, increment count if a bus meets both of the following conditions:
Number is an even integer.
Number of people is greater than
Lastly, output count followed by a newline.
Ex: For the input:
then the output is:
int busNumbers new int NUMVALS;
int numPeople new intNUMVALS;
int ;
int count;
for NUMVALS;
busNumbers nextInt ;
for NUMVALS;
numpeoplei;
I Your code goes here
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
