Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Arrays;
- import java.util.Scanner;
- public class PrintSixNumbersBackward {
- public static void main(String[] args){
- Scanner scanner = new Scanner(System.in);
- int[] nArray = new int[6];
- int[] nArrayBackwards = new int[6];
- for(int i = 0; i<6; i++){
- nArray[i] = scanner.nextInt();
- }
- for(int j=0; j<6; j++){
- nArrayBackwards[6-j-1] = nArray[j];
- }
- System.out.println(Arrays.toString(nArrayBackwards));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement