C语言课程设计

来源:百度知道 编辑:UC知道 时间:2024/05/22 08:42:17
学生成绩管理系统.要求可以输入.查询学生信息和各科成绩,修改学生信息,修改学生成绩。求总分.平均分.成绩排序等功能。有类似的就可以

这好像是数据库课程设计阿 用vb或c++编写的可能多一些。c的还真不知道。帮不上忙,不好意思

#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "conio.h"
#include "mem.h"
#include "ctype.h"
#include "alloc.h"

struct score
{int mingci;
char xuehao[8];
char mingzi[20];
float score[6];
}
data,info[1000];
int i,j,k=0;
char temp[20],ch;
FILE *fp,*fp1;

void shuru()
{if((fp=fopen("s_score.txt","ab+"))==NULL)
{printf("cannot open this file.\n");
getch();exit(0);
}
for(i=0;i<=1000;i++)
{printf("\nPlease shuru xuehao:");
gets(data.xuehao);
printf("Please shuru mingzi:");
gets(data.mingzi);
printf("Please shuru yuwen score:");
gets(temp);data.score[0]=atof(temp);
printf("Please shuru shuxue score: