CountingM

Code

import java.util.Scanner;

public class CountingM
{
    public static void main( String[] args )
    {
        Scanner keyboard = new Scanner(System.in);
        
        int num , num1;

        System.out.println( "Type the number you wish for me to count to" );
        num1 = keyboard.nextInt();

        for (num = 1 ; num <= num1 ; num = num+1 )
        {
            System.out.print( " " + num + " " );
            
        }
        System.out.println( " " );
    }
}

CountingM

Assignment 80