# 15-07-08 array--Remove the lowest points to remove the highest score averaging points

Source: Internet
Author: User

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

Related Keywords:

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

## A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

• #### Sales Support

1 on 1 presale consultation

• #### After-Sales Support

24/7 Technical Support 6 Free Tickets per Quarter Faster Response

• Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.