Question: Given the integer array dailySalaries with the size of NUM_IN, write a for loop to output the integers in the first half of dailySalaries

Given the integer array dailySalaries with the size of NUM_IN, write a

Given the integer array dailySalaries with the size of NUM_IN, write a for loop to output the integers in the first half of dailySalaries in reverse order. Separate the integers with a vertical bar surrounded by spaces (1"). Ex: If the input is 84 50 38 65 55 64 51 52, then the output is: 65 | 38 | 50 | 84 4 public static void main(String[] args) { Scanner scnr = new Scanner(System.in); final int NUM_IN = 8; int[] dailySalaries = new int [NUM_IN]; int i; t in 10 5 6 7 8 00 ch 9 10 11 12 13 14 15 16 17 18 19 } 20 } for (i = 0; i < dailySalaries.length; ++i) { dailySalaries[i] = scnr.nextInt (); } for (/* Your code goes here */) { /* Your code goes here */ } System.out.println(); Given the integer array dailySalaries with the size of NUM_IN, write a for loop to output the integers in the first half of dailySalaries in reverse order. Separate the integers with a vertical bar surrounded by spaces (1"). Ex: If the input is 84 50 38 65 55 64 51 52, then the output is: 65 | 38 | 50 | 84 4 public static void main(String[] args) { Scanner scnr = new Scanner(System.in); t in 10 5 6 7 8 00 ch 9 10 11 12 13 14 15 16 17 18 19 } 20 } final int NUM IN = 8; int[] dailySalaries = new int [NUM_IN]; int i; for (i = 0; i < dailySalaries.length; ++i) { dailySalaries [i] = scnr.nextInt (); } for (/* Your code goes here */) { /* Your code goes here */ } System.out.println();

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Java program that reads 8 integers into an array and then outputs t... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!