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