Question: 5 . 4 . 2 : Iterating through arrays. 5 6 9 3 3 8 . 4 5 5 0 4 0 2 . qx
: Iterating through arrays.
qxzqy
Jump to level
Given the integer array hourlySalaries with the size of ARRVALS, write a for loop to output the integers in the first half of hourlySalaries. Separate the integers with an asterisk surrounded by spaces
Ex: If the input is then the output is:
import java.util.Scanner;
public class SalaryRange
public static void mainString args
Scanner scnr new ScannerSystemin;
final int ARRVALS ;
int hourlySalaries new intARRVALS;
int i;
for i ; i hourlySalaries.length; i
hourlySalariesi scnrnextInt;
for i hourlyTemps.length ; i ; i
System.out.printhourlyTempsi;
if i
System.out.print;
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
