Assignemnt #61 and Guesss.java

Code

    /// Name: Boris Kazantsev
    /// Period: 6
    /// Program Name: Guesss
    /// File Name: Guesss.java
    /// Date Finished: 1/14/2016
    
    import java.util.Scanner;
    import java.util.Random;
    
    public class Guesss{
        public static void main(String[] args){
            Scanner keyboard = new Scanner(System.in);
            
            Random r = new Random();
            
            int a, num = 1 + r.nextInt(10);
            
            System.out.print("Guess 0-10: ");
    		a = keyboard.nextInt();
            
            while ( a != num ){
                System.out.println("Guess again: ");
                a = keyboard.nextInt();
            }
            
            System.out.println("Yes");
        }
    }
        
        
                   
    

Picture of the output

Assignment 61