Assignment #80 and Seventy-Eight Program
Code
/// Name: Georgi Atanasov
/// Period: 5
/// Program Name: Counting Machine
/// File Name: CountingMachine.java
/// Date Finished: 3/2/2016
import java.util.Scanner;
public class CountMach
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
int countTo;
System.out.print("Count to: ");
countTo = keyboard.nextInt();
for ( int n = 0; n <= countTo; n++ )
{
System.out.print(n + " ");
}
System.out.println();
}
}
Picture of the output