Assignemnt #109 and Refreasher Challenge
Code
///Name: Daniel Tiffany-Appleton
///Period: 7
///Program Name: Refreasher Challenge
///File Name: RefreasherChallenge
///Date Finished: 3/18/16
import java.util.Scanner;
public class RefreasherChallenge
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int n = 1;
System.out.print("What is your name: ");
String name = keyboard.next();
System.out.println(" ");
if(name.equals("Josh"))
{
for(n=1; n<=5; n++)
{
System.out.println(name);
}
return;
}
while(n <= 10)
{
System.out.println(name);
n++;
}
}
}
Picture of the output