Assignemnt #112
Code
/// Name: Connor Siri
/// Period: 7
/// Program Name: Refresh
/// File Name: Refresh.java
/// Date Finished: 2/24/2016
import java.util.Scanner;
public class Refresh
{
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("");
if (name.equals("josh"))
{
for (int n = 0; n < 5; n++)
{
System.out.println(name);
}
}
else
{
for (int n = 0; n < 10; n++)
{
System.out.println(name);
}
}
}
}
Picture of the output