write a program to read a grades of 5 student ,each studnet has subjects;then find the average of : each student each subjectw

write a program to read a grades of 5 student ,each studnet has subjects;then find the average of :

each student

each subject

  1. اوضح يعني فيه خمس مواد تبي تحسب الافرج لها صحيح ? هذا الي فهمته . (اهم شي ادعي لي )
    
     
    
    int a[]=new int [5];
    int average=0;
    for (int i = 0; i < 5; i++) {
    System.out.println("Enter the grades fo the subjects #"+i);
    a[i]=in.nextInt();
    average+=a[i];
    }
    System.out.println("the aerge is "+ (average/5));
    }
    
                    	
    • 0
أضف اجابة

أضف اجابة

‫تصفح