Ответ:
Scanner scan = new Scanner(System.in);
int sum = 0;
int x = scan.nextInt();
while (x != 0) {
sum += x;
x = scan.nextInt();
}
System.out.println(sum);
Объяснение:
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
Scanner scan = new Scanner(System.in);
int sum = 0;
int x = scan.nextInt();
while (x != 0) {
sum += x;
x = scan.nextInt();
}
System.out.println(sum);
Объяснение: