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