import java.util.Scanner; public class CountingMachineII { public static void main (String[] args) { Scanner keyboard = new Scanner(System.in); int from; int to; System.out.println("Where should I start?"); from = keyboard.nextInt(); System.out.println("What number should I count to?"); to = keyboard.nextInt(); for (int n = from; n <= to; n = n + 1) { System.out.println(n); } } }