и немогу понять. как вывести все числа кроме N
package com.javarush.task.pro.task05.task0505;
import java.util.Scanner;
/*
Reverse
*/
public class Solution {
public static void main(String[] args) {
//напишите тут ваш код
Scanner sc = new Scanner(System.in);
//1
int N = sc.nextInt();
int[] array = new int[N];
//2
if (N > 0) {
for (int i = 0; i < array.length; i++) {
array[i] = sc.nextInt();
}
//3
if (N > 0 && N % 2 == 1) {
for (int i = array.length; i >= 0; i++) {
System.out.println(array[i]);
}
}
else
for (int i = array.length-1; i >= 0; i--) {
System.out.println(array[i]);
}
}
} }