Assignemnt #109 and Refresher Challenge
Code
/// Name: Marco Correa
/// Period: 5
/// Program Name: Refresher Challenge
/// File Name: Refresher Challenge.java
/// Date Finished: 4/2/2016
import java.util.Scanner;
public class RefresherChallenge {
public static void main(String[] args) {
Scanner k = new Scanner(System.in);
System.out.print("What is your name: ");
String name = k.next();
System.out.println();
for (int n = 1; n <= 10; n++) {
System.out.println(name);
if (name.equals("Josh"))
n++;
}
}
}
Picture of the output