Effect:
Student Java PHP c+ total score Average ranking
lily3030309030 1th Place
bill2020206020 2nd place
Code:
ImportJava.util.Scanner; Public classchengguan{ Public Static voidMain (string[] args) {Scanner in=NewScanner (system.in); System.out.println ("Please enter the number of students"); intxuesheng=In.nextint (); System.out.println ("Please enter the number of disciplines"); intXueke=In.nextint (); String[] Name=NewString[xuesheng]; String[] Course=NewString[xueke]; int[] number=New int[Xuesheng][xueke]; int[] sum=New int[Xuesheng]; String[] All=NewString[xuesheng]; for(inti=0;i<xueke;i++) {System.out.println ("Please enter the name of" + (i+1) + "Subject of the door"); Course[i]=In.next (); } for(inti=0;i<xuesheng;i++) {System.out.println ("Please enter" + (i+1) + "Name of student"); Name[i]=In.next (); intS=0; String all1=""; for(intj=0;j<xueke;j++) {System.out.println ("Please enter" +name[i]+ "" +course[j]+ "score"); NUMBER[I][J]=In.nextint (); S+=Number[i][j]; All1+=number[i][j]+ "\ T"; } Sum[i]=s; All[i]=name[i]+ "\ t" +all1+sum[i]+ "\ T" + (sum[i]/Xueke); } for(inti=0;i<xuesheng-1;i++){ for(intj=0;j<xuesheng-1;j++){ if(sum[j]<sum[j+1]){ intB=SUM[J]; String c=All[j]; SUM[J]=SUM[J+1]; All[j]=all[j+1]; Sum[j+1]=b; all[j+1]=C; }}} System.out.print (Students); for(inti=0;i<xueke;i++) {System.out.print ("\ T" +Course[i]); } System.out.print ("\ t total score \ t Average sub-list"); System.out.println (); for(inti=0;i<xuesheng;i++) {System.out.print (all[i]); System.out.print ("\ T" + "i+1" + (+ +) + "First Name"); System.out.println (); } }}
Java Student Performance Management system