Assignment #80

Code

/*
jack newsom
period 5
program CountingMachine
filename CountingMachine.java
date completed 10/21/15 
*/

import java.util.Scanner;

public class CountingMachine
{
    public static void main( String [] args )
    {
        Scanner bot = new Scanner(System.in);
        
        System.out.print("Count to: ");
        int user = bot.nextInt();
        
        for ( int counter = 0 ; counter <= user ; counter = counter + 1 )
        {
            System.out.print( " " + counter );
        }
        
        System.out.println("");
        
    }
}      
    

Picture of the output

Assignment X