Assignemnt #109 MoRefresh.java

Code

    /// Name: Boris Kazantsev
    /// Period: 6
    /// Program Name: refresh
    /// File Name: refresh.java
    /// Date Finished: 5/16/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("kaz")){
            do{
                System.out.println(name);
                HowMany++;
            }
            
            while ( HowMany != 5);
        }
        
        else 
            do{
            System.out.println(name);
            HowMany++;
        }
        while (HowMany != 10);
        
    }
}
        


   
    

Picture of the output

Pic