Assignemnt #109
Code
/// Name: Daniel Nguyen
/// Period: 6
/// Project Name: refreshchal
/// File Name: refreshchal.java
/// Date: 3/11/2015
import java.util.Scanner;
public class refreshchal
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
System.out.print("What is your name? ");
String name = keyboard.nextLine();
System.out.println("\n");
int times = 5 + ( name.equals("Josh")? 0 : 5);
for (int i = 0; i < times; i++ )
System.out.println(name);
}
}
Picture of the output