#include<iostream>
using namespace std;
int main()
{
int a[101]={7,49,73,58,30,72,44,78,23,9,40,65,92,42,87,3,27,29,40,12,3,69,9,57,60,33,99,78,16,35,97,26,12,67,10,33,79,49,79,21,67,72,93,36,85,45,28,91,94,57,1,53,8,44,68,90,24,96,30,3,22,66,49,24,1,53,77,8,28,33,98,81,35,13,65,14,63,36,25,69,15,94,29,1,17,95,5,4,51,98,88,23,5,82,52,66,16,37,38,44,1};
int i,j,temp;
for(i=0;i<100;i++)
{
for(j=i+1;j<101;j++)
{
if(a[i]>a[j])
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
}
cout<<a[50]<<endl;
return 0;
}
2166 中位数
最新推荐文章于 2021-07-26 15:42:53 发布