Assignment # 108 and Refresher
Code
/// Name: Tommy Oyuntseren
/// Period: 7
/// Program Name: Refresher
/// File Name: Refresher.java
/// Date: 5/4/16
import java.util.Scanner;
public class Refresher
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
int n;
System.out.print("What is your name? ");
String name = keyboard.next();
System.out.println( " " );
if (name.equals("Josh"))
n= 5;
else
n= 10;
for (int x=1; x<=n; x++)
{
System.out.println(name);
}
}
}
Picture of the output