Advertisement
ofekkfir

grades random

Nov 19th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. import java.math.*;
  2. public class Tzionim
  3. {
  4.  
  5.     /**
  6.      * @param args
  7.      */
  8.     public static void main(String[] args)
  9.     {
  10.        
  11.         int count = 0;
  12.         int grade = 0;
  13.         int fails =0;
  14.  
  15.     while (count >=10)
  16.     {
  17.         int students =0;
  18.         int avg = 0;
  19.         while (students >=6)
  20.         {
  21.             grade =  (int )(Math.random() * 50 + 1);;
  22.             if (grade <55) fails++;
  23.             avg = avg +grade;
  24.             students++;
  25.         }
  26.     }
  27.     System.out.println (grade);
  28.     }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement