Assignemnt #109 and RefresherChallenge
Code
/// name: Leila Ordukhani
/// period: 6
/// program name: Ninety-Nine Program
/// file name: RefresherChallenge.java
/// date finished: 4/14/16
import java.util.Scanner;
public class RefresherChallenge
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
int max = 10;
System.out.print("Your name: ");
String name = keyboard.next();
System.out.println();
if ( name.equals("Josh") )
max = 5;
for ( int i = 0; i < max; i++ ){
System.out.println(name);
}
}
}
Picture of the output