Assignment 80

Code

///Matthew Hughs
///5th period
///Counting.java
///3/31/2016

import java.util.Scanner;

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

Picture of the output

Countingfor