Assignment 63 and Loop

Code

///Matthew Hughs
///Period 5
///Loop
///Loop.java
///12/16/2015

import java.util.Scanner;

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

		System.out.println( "Type in a message, and I'll display it five times." );
		System.out.print( "Message: " );
		String message = keyboard.nextLine();

		int n = 0;
		while ( n < 5 )
		{
			System.out.println( (n+1) + ". " + message );
			n++;
		}

	}
}
    

Picture of the output

Loop