Assignment # 80 and Counting Machine

Code

    /// Name: Tommy Oyuntseren
    /// Period: 7
    /// Program Name: CountingMachine
    /// File Name: CountingMachine.java
    /// Date: 1/28/2016

import java.util.Scanner;

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

  

Picture of the output

Assignment 80