Assignment #80 and Counting Machine
Code
/// Name: Graham Pollock
/// Period: 5
/// Program Name: Counting Machine
/// File Name: CountingMachine.java
/// Date Finished: 02/05/2016/
import java.util.Scanner;
public class CountingMachine
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
System.out.print("Count to: ");
int cto = keyboard.nextInt();
System.out.println("");
for (int n = 1; n <= cto; n++)
{
System.out.print(n + " ");
}
System.out.println("");
}
}
Picture of the output