//...
private void demoInput() {
int total = 0;
int input = 0;
do {
System.out.println("Insert an integer (0 to quit): ");
input = s.nextInt();
total += input;
System.out.println("Running total is: " + total);
} while(input != 0);
}
//...
Comments