Assignemnt #113
Code
/// Name: Connor Siri
/// Period: 7
/// Program Name: Challenge
/// File Name: Challenge.java
/// Date Finished: 2/24/2016
import java.util.Scanner;
public class Challenge
{
public static void main( String[] args )
{
Scanner kb = new Scanner(System.in);
String name;
System.out.print("What is your name: " );
name = kb.next();
System.out.println("");
int x = 0;
if (name.equals("josh"))
{
x = 5;
}
for (int n = x; n < 10; n++)
{
System.out.println(name);
}
}
}
Picture of the output