Assignment #80

Code

/// Name: Jonathan Stine
/// Period: 5
/// Program Name: Counting Machine
/// File Name: CountingMachine.java
/// Date Finished: 4000 ACE (After the Common Era)
    
    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 m = keyboard.nextInt();
            
            for ( int n = 1; n <= m; n = n+1 ) {
                System.out.print( n + "\t" );
            }
            System.out.println();
            
        }
    }
    
 
    

Code Output