Question: Given the integer array yearlyMiles with the size of NUM _ INPUTS, write a for loop to output the integers in the first half of
Given the integer array yearlyMiles with the size of NUMINPUTS, write a for loop to output the integers in the first half of yearlyMiles. Separate the integers with a dash surrounded by spaces
Ex: If the input is then the output is:
public class MileData
public static void mainString args
Scanner scnr new ScannerSystemin;
final int NUMINPUTS ;
int yearlyMiles new intNUMINPUTS;
int i;
for i ; i yearlyMiles.length; i
yearlyMilesi scnrnextInt;
for your code here
your code here
System.out.println;
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
