Assignment #108 and A Refresher
Code
///Name: Tim Gibson
///Period: 6
///Project Name: A Refresher
///File Name: Refresher.java
///Date Finished: 12/4/15
import java.util.Scanner;
public class Refresher
{
public static void main ( String[] args )
{
Scanner kb = new Scanner(System.in);
System.out.print("What is your name: " );
String 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