Question #241636

Write a program that checks the top 3 most likely outcome of numbers from 0 to 31


Expert's answer



package random1;



public class Random1 {


   
    public static void main(String[] args) {
        System.out.println("The top 3 most likely outcome of numbers from 0 to 31");
        for(int x =0; x<3; x++){
      int number = (int)(31.0 * Math.random());
      System.out.println(number);
}






    }
    
}

LATEST TUTORIALS
APPROVED BY CLIENTS