谢谢您的回答 可是还有一道跟它相关的题

谢谢您的回答 可是还有一道跟它相关的题
#include
#include
struct student{
x05int id;
x05int score;
};
void sort(struct student* students,int n){
/*Sort the n students based on their score*/
/* Remember,each student must be matched with their original score after sorting */
}
int main(){
/*Declare an integer n and assign it a value.*/
/*Allocate memory for n students using malloc.*/
/*Generate random IDs and scores for the n students,using rand().*/
/*Print the contents of the array of n students.*/
/*Pass this array along with n to the sort() function*/
/*Print the contents of the array of n students.*/
return 0;
}
Sun-cloud 1年前 已收到1个回答 举报

woshiyizhixiaoyu 幼苗

共回答了16个问题采纳率:93.8% 举报

#include #include struct student{int id;int score;};void sort(struct student* number, int n){&nbs...

1年前

4
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.028 s. - webmaster@yulucn.com