Enter the student's score, remove the two highest points, remove the two minimum points, sum after the average score
Console.Write ("Please enter the number of people:"); intR =Convert.ToInt32 (Console.ReadLine ()); int[] CJ =New int[R]; if(R >=5) { for(inti =0; I < R; i++) {Console.WriteLine ("Please enter the first {0} personal score", i +1); Cj[i]=Convert.ToInt32 (Console.ReadLine ()); } for(intA =0; A < CJ. Length-1; a++) { for(intb =0; b < CJ. Length-1A b++) { if(Cj[b] >= cj[b +1]) { intZJ =Cj[b]; CJ[B]= Cj[b +1]; Cj[b+1] =ZJ; } } } intsum =0; for(intx =0; X < CJ. Length; X + +) { if(x = =0|| x = =1|| x = = CJ. Length-1|| x = = CJ. Length-2) { } Else{sum= Sum +Cj[x]; } } DoublePJ = SUM/(CJ. Length-4); Console.WriteLine ("the average of the two highest and two lowest points is removed:"+PJ); } Else{Console.WriteLine ("Please enter a number greater than or equal to 5!!! "); }
15-07-08 array--Remove the lowest points to remove the highest score averaging points