Assignemnt #109 and Refresher Challenge
Code
/// Name: Brian Phillips
/// Period: 5
/// Program name:Refresher Challenge
/// File Name: Refresh2.java
/// Date Finished: 5/4/2016
import java.util.Scanner;
public class Refresh2
{
public static void main (String [] args)
{
Scanner one = new Scanner(System.in);
String name;
System.out.print("Please enter your name: ");
name = one.next();
int n = 10;
if (name.equals("Bob"))
{
n = 5;
}
for (int x = 0;n > x; x++)
{
System.out.println(name);
}
}
}
Picture of the output