Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //...
- 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);
- }
- //...
Advertisement
Add Comment
Please, Sign In to add comment