Assignment #80 and Counting Machine
Code
/// Name: Ali Kurland
/// Period: 6
/// Program Name: Counting Machine
/// File Name: CountingMachine.java
/// Date Finished: 10/23/2015
import java.util.Scanner;
public class CountingMachine
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int x;
System.out.print( "Count to: " );
x = keyboard.nextInt();
for ( int n = 0 ; n <= x ; n = n+1 )
{
System.out.print( n + " " );
}
System.out.print( "\n" );
}
}
Picture of the output