public class Solution {
    public static void main(String[] args) {
        Scanner cs = new Scanner(System.in);
        System.out.println("Введите число N: ");
        int N = cs.nextInt();
        System.out.println("Введеное число N: " + N);
        System.out.println("Введите значения массива: ");
        int[] array = new int[5];
        for (int i = 0; i < 5; i++) {
            array[i] = cs.nextInt();
            //System.out.println(array[i]);
        }
        if(N % 2 == 0) {
            for (int i = 4; i >= 0; i--) {
                System.out.println(array[i]);
            }
        }else
        {
            for (int i = 0; i < 5; i++) {
                System.out.println(array[i]);
            }
        }
    }
}
В чем причена ошибки, подскажите