Assignment #109 RefresherChallenge
Code
/// Name: Lacey Reese
/// Period: 5
/// Program Name: RefresherChallenge
/// File Name: RefresherChallenge.java
/// Date Finished 4/21/2016
import java.util.Scanner;
public class RefresherChallenge
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
System.out.println();
System.out.println("What is your name?");
String name = keyboard.next();
int a=10;
if (name.equals("Josh"))
{
a= 4;
}
for ( int n = 1 ; n <= a ; n = n+1 )
{
System.out.println( " " + name + " " );
}
}
}
Picture of the output