Assignemnt #63 Counting With A While Loop

Code

    ///Name: Morgan Kaplan
    ///Period: 5
    ///Project Name: Counting With A While Loop
    ///File Name: CountingLoops.java

import java.util.Scanner;

public class CountingLoops
{
	public static void main( String[] args )
	{
		Scanner momo = new Scanner(System.in);

        int n = 0, x;
        
		System.out.println( "Here you will be typing a message.  How many times should the system print?" );
        x=momo.nextInt();
        momo.nextLine();
		
        System.out.print( "Message: " );
		String Message = momo.nextLine();
        
		while ( n < x )
		{
			System.out.println( ( 10 * (n)) + ". " + Message);
			n++;
        }

	}
}

    

Picture of Output

Assignment 63