答:struct Records { char name[15]; char birth[8]; char tele[20]; };int my_sort(Records records[], int n) { for(int i = 0; i < n -1; i++) { for(int j = 0; j < n - i - 1; j++) { if(strcmp(records[j].name,records[j+1].name) > 0) { Records temp = records[j];
输入n个朋友的信息,包括姓名、生日、电话号码。按照姓名依字母序依次输出通讯录。题目保证所有人的姓名均不相同。 本题要求: 定义一个结构体类型Records,结构体包括三个成员name、birth、...
最新推荐文章于 2024-05-30 20:15:33 发布