Assignemnt #108 and refresh
Code
///Name: Luke Shin
///Period: 7
///Project Name: refresh
///File Name: refresh.java
///Date: 03/18/2016
import java.util.Scanner;
public class refresh{
public static void main(String[] args){
String name = "";
int HowMany=0;
Scanner keyboard = new Scanner(System.in);
System.out.print("What is your name?: ");
name = keyboard.next();
if (name.equals("Josh")){
do{
System.out.println(name);
HowMany++;
}
while ( HowMany != 5);
}
else
do{
System.out.println(name);
HowMany++;
}
while (HowMany != 10);
}
}
Picture of the output