Подскажите, плиз, где ошибка
package com.javarush.task.pro.task05.task0505;
import java.util.Scanner;
import java.util.Arrays;
/*
Reverse
*/
public class Solution {
public static void main(String[] args) throws Exception {
//напишите тут ваш код
Scanner s = new Scanner(System.in);
int n = s.nextInt();
//int console = s.nextInt();
int[] array = new int[n];
for(int i = 0; i < n; i++){
array[i] = s.nextInt();
}
if(n > 0 && n % 2 == 0){
for(int i = n; i >= 0; i--){
System.out.println(array[i]);
}
} else if(n> 0 && n % 2 != 0){
for(int i = 0; i < n; i++){
System.out.println(array[i]);
}
}
}}