Assignemnt #63

Code

    ///Name: Joshua Bautista
    ///Period: 6
    ///Project Name: CountingWithAWhileLoop
    ///File Name: CountingLoop.java
    ///Date: 1/7/2016
    
    import java.util.Scanner;

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

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

		int n = 1;
		while ( n < 11 )
		{
			System.out.println( (n*10) + ". " + message );
			n++;
            // n++ stops the statement from going over the specific amount of times the statement is told to do
		}

	}
}
    

Picture of the output

Assignment 1