перепробовал много вариантов кода, решить не получается
package com.javarush.task.pro.task04.task0403;
import java.util.Scanner;
/*
Суммирование
*/
public class Solution {
public static void main(String[] args) {
//напишите тут ваш код
Scanner sc=new Scanner(System.in);
int sym=0;
boolean st=false;
while (!st)
{
int n=sc.nextInt();
if (sc.hasNextInt())
sym=sym+n;
String a=sc.nextLine();
if (sc.hasNextLine());
st=a.equals("ENTER");
}
System.out.print(sym);
}
}