You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
StudentSystem/c10代码.md

14 lines
365 B

2 years ago
// 10函数功能按选择法将数组num的元素值按从低到高排序
void AsSortbyNum(STU stu[], int n, int m)
{
int i, j, k, t;
for (i=0; i<n-1; i++)
{
K=i;
for(j=i+1;j<10;j++)
{
if((*compare)(stu[k]num.stu[j].num)) k=j;}
if(k!=i)
{t=stu[i].num;stu[i].num=stu[k].num;stu[k].num=t;}
}
}