Assignemnt #108 Refresh

Code

    /// Name: Caelan Dorstad
    /// Period: 6
    /// Program Name: refresh
    /// File Name: refresh.java
    /// Date Finished: 4/5/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

Assignment 10