Assignemnt #79 and TenTimes
Code
/// name: Leila Ordukhani
/// period: 6
/// program name: Sixty-Nineth Program
/// file name: TenTimes.java
/// date finished: 1/26/16
import java.util.Scanner;
public class TenTimes
{
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();
for ( int n = 1 ; n <= 10 ; n = n+1 )
{
System.out.println( n + ". " + message );
}
}
}
Picture of the output