Code
/// Name: Afaf Nabeeha
/// Period: 7
/// Program Name: Counting Machine
/// File Name: Counting.java
/// Date Finished: 1/29/16 public class Counting
import java.util.Scanner;
public class Counting
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int number, count;
System.out.print( "Count to: " );
number = keyboard.nextInt();
for ( count = 0; count <= number; count++ )
{
System.out.print( count + " " );
}
System.out.println();
}
}
Picture of the output