Question: Ex: If the input is 7 9 , 6 1 , 4 8 , 1 0 5 , 8 8 , 5 1 , 1

Ex: If the input is 79,61,48,105,88,51,115,30,62,84, then the output is:
84,62,30,115,51,88,105,48,61,79
public static void main(String[] args){
Scanner scnr= new Scanner(
System.in);
final int ARR_LENGTH =10;
int [] yearlySalaries = new int[ARR_LENGTH];
int i;
for yearlySalaries.length; ++i){
}
yearlySalaries [i]=scnr.nextInt();
for (i=y yearlySalaries. length -1;i|0;-i|
}
System.out.print(yearlySalaries [i]+",");
System.out.println();
}
 Ex: If the input is 79,61,48,105,88,51,115,30,62,84, then the output is: 84,62,30,115,51,88,105,48,61,79

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!