java第三次作业
package sum;
import java.util.Scanner;
public class numsum {
public static void main(String[]args){
int sum = 0;
Scanner kbInput = new Scanner(System.in);
while (true) {
int nextValue = kbInput.nextInt();
sum += nextValue;
System.out.println("sum:" + sum);
}
}
}