|
|
|
@ -252,7 +252,21 @@ void SortbyName(STU stu[],int n,int m)
|
|
|
|
|
```
|
|
|
|
|
void SearchbyNum(STU stu[],int n,int m)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
long number;
|
|
|
|
|
int i,j;
|
|
|
|
|
printf("Input the number you want to search:");
|
|
|
|
|
scanf("%ld",&number);
|
|
|
|
|
for(i=0;i<n;i++)
|
|
|
|
|
if(stu[i].num==number)
|
|
|
|
|
{
|
|
|
|
|
printf("\n");
|
|
|
|
|
for(j=0;j<m;j++)
|
|
|
|
|
printf("%d\t",stu[i].score[j]);
|
|
|
|
|
printf("\n");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if(i==n)
|
|
|
|
|
printf("\nNot found!\n");
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|