Assignemnt #78

Code

///colin hinton
///5th peroid
///Count.java
///12/1/2015

import java.util.Scanner;

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

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

        for ( int n = 1 ; n <= 10 ; n = n+1 )
        // n + 1 adds one to the value of N so that 5 can be achieved
        // (n = 1) both gives us a value to add for n + 1 and it gives us a display number
        {
            System.out.println( (n * 2) + ". " + message );
        }

    }
}


    

Picture of the output

Assignment 1