Package main;
import java.util.Scanner;
public class test2 {
public static void main(String[] args) {
Scanner scan1 = new Scanner(System.in);
System.out.println("для завершения введите 0");
int a;
do{
a = scan1.nextInt();
if (a < 0)
System.out.println(a);
}while(a != 0);
}
}