Assignment #109
Code
/// Gian Adoremos
/// Period: 7
/// Program Name: HundrethNinth Program
/// File Name: Refresh.java
/// Date Finished: 4/27/16
import java.util.Scanner;
public class Refresh
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
System.out.println("What is your name?");
String name = keyboard.next();
int i = 10;
if ( name.equals("Josh") )
i = 5;
print(i, name);
}
public static void print( int i, String n )
{
for ( i++; i >1 ; i-- )
{
System.out.println(n);
}
}
}
}
Picture of the output