在线等30分钟:c语言编程:能够输入100个学生的学号和姓名,并将。。。。。 已给出三个函数,求主函数。

[复制链接]
查看11 | 回复2 | 2011-6-1 13:20:15 | 显示全部楼层 |阅读模式
c语言编程:能够输入100个学生的学号和姓名,并将学生按照学号由小到大排序。当输入一个学号是能用折半查找找出该学生的姓名。
提示:函数inputdata用于完成100个学生的数据的录入,函数sort用于按学号进行排序,函数search用折半查找法找出指定学号的学生姓名。

回复

使用道具 举报

千问 | 2011-6-1 13:20:15 | 显示全部楼层
//这个可以吗#include #include #define N 100struct STUDENT{char id[20];char name[20];};typedef struct STUDENT Student;void inputdata(Student student[],int n);void sort(Student student[],int n);void search(Student student[],int n);void main(){Student student[N];inputdata(studen...
回复

使用道具 举报

千问 | 2011-6-1 13:20:15 | 显示全部楼层
void main(){inputdata();sort(学号);search(学号,姓名);return 0;}//主函数完毕...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行