Assignment #108 and A Refresher
Code
/// Name: Ali Kurland
/// Period: 6
/// Program Name: A Refresher
/// File Name: Refresher.java
/// Date Finished: 1/5/2016
import java.util.Scanner;
public class Refresher
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int n;
System.out.print( "What is your name? " );
String name = keyboard.next();
System.out.println( " " );
if ( name.equals("Josh") )
n = 5;
else
n = 10;
for ( int x=1; x<=n; x++ )
{
System.out.println( name );
}
}
}
Picture of the output