import java.util.Scanner; public class AddingValues { public static void main( String[] args ) { Scanner keyboard = new Scanner(System.in); int num, current; current = 0; System.out.println( " I will add up your numbers " ); num = keyboard.nextInt(); while (num != 0) { current = (current+num); System.out.println( "Next" ); num = keyboard.nextInt(); } { System.out.println( " the total is: " + current ); } } }