//Enter a score of 10 people to find the highest score, the lowest score, the average int[] Fenshu =New int[Ten]; intMax =0; intMin =0; intsum =0; for(inti =0; I <Ten; i++) {Fenshu[i]=int. Parse (Console.ReadLine ()); Sum+=Fenshu[i]; if(i = =0) {Max=Fenshu[i]; Min=Fenshu[i]; } Else { if(Max <Fenshu[i]) {Max=Fenshu[i]; } if(Min >Fenshu[i]) {min=Fenshu[i]; }}} Console.WriteLine ("Maximum value:"+max); Console.WriteLine ("Minimum Value:"+min); Console.WriteLine ("Average score:"+ sum/Ten); //Enter the age of the class, sorted by age from big to smallConsole.Write ("Please enter the number of people:"); intn =int. Parse (Console.ReadLine ()); int[] nianling =New int[n]; for(inti =0; I < n; i++) {Console.Write ("Please enter the age of the {0} individual:". II1); Nianling[i]=int. Parse (Console.ReadLine ()); } //Start Sorting for(intj =0; J < N-1; J + +) { for(inti = j+1; I < n; i++) { if(Nianling[i] >Nianling[j]) { //equal substitution intZhong =Nianling[i]; Nianling[i]=Nianling[j]; NIANLING[J]=Zhong; } } } foreach(intIinchnianling) {Console.WriteLine (i); } console.readline ();
Enter a score of 10 people to find the highest score, the lowest score, and the bubble sort.