import java.util.Scanner; public class Counting { public static void main( String[] args ) { Scanner keyboard = new Scanner(System.in); System.out.print("Count to: "); int b = keyboard.nextInt(); int a = 0; for (int c = 0; c <= b; c++) { System.out.print(a + " "); a++; } System.out.println(); } }