הגרלת num מספרים בין 1 ל 100 , חישוב הממוצע , וספירה של מספר ההגרלות מעל 90
int num, grade,sum = 0,count = 0;
double avg;
System.out.println("please insert number of students");
num = reader.nextInt();
for (int i=0;i<num;i++){
grade = (int)(Math.random()*100)+1;
if (grade > 90){
count++;
}
sum = sum + grade;
System.out.println("grade of student "+(i+1)+" is : "+grade+" sum = "+sum);
}
avg = (double)sum/ num;
System.out.println("avg = "+avg);
System.out.println("number of student with grade above 90 is : "+count);