Компилятор говорит что у меня вечный цикл, а я не понимаю где, и в IDEA все решается...но задача не отправляется.
package com.javarush.task.pro.task04.task0406;
import java.util.Scanner;
/*
Показываем, что получаем
*/
public class Solution {
public static void main(String[] args) {
//напишите тут ваш код:
Scanner console = new Scanner(System.in);
while (true) {
if (console.hasNextInt())
{
int i = console.nextInt();
System.out.println(i);
} else if (console.hasNextLine()) {
String str = console.nextLine();
if (str.equals("enought"))
break;
else
System.out.println(str);
}}
}
}