Assignment #80: Counting Machine

Code

import java.util.Scanner;

public class CountingMachine {
    
    public static void main (String[] args) {
    
        Scanner keyboard = new Scanner(System.in);
        
        int count;
        
        System.out.println("What number should I count to?");
        count = keyboard.nextInt();
        
        for (int n = 1; n <= count; n = n + 1) {
        
            System.out.println(n);
            
        }
        
    }
    
}
    

Picture of the output