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