#include "" /*I/O函数*/
#include "" /*其它说明*/
#include "" /*字符串函数*/
#include "" /*屏幕操作函数*/
#include "" /*内存操作函数*/
#include "" /*字符操作函数*/
#include "" /*动态地址分配函数*/
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("","ab+"))==NULL)
{
printf("cannot open this file.\n");
getch();exit(0);
}
for(i=0;i<=1000;i++)
{
printf("\nPlease shuru xuehao:");
gets();
printf("Please shuru mingzi:");
gets();
printf("Please shuru yuwen score:");
gets(temp);[0]=atof(temp);
printf("Please shuru shuxue score:");
gets(temp);[1]=atof(temp);
printf("Please input yingyu score:");
gets(temp);[2]=atof(temp);
printf("Please shuru wuli score:");
gets(temp);[3]=atof(temp);
printf("Please shur huaxue score:");
gets(temp);[4]=atof(temp);
[5]=[0]+[1]+[2]+[3]+[4];
fwrite(&data,sizeof(data),1,fp);
printf("another?y/n");
ch=getch();
if(ch=='n'||ch=='N')
break;
} fclose(fp);
}
void xianshi()
{
float s;int n;
if((fp=fopen("","rb+"))==NULL)
{
printf("Cannot reading this file.\n");
exit(0);
}
for(i=0;i<=1000;i++)
{
if((fread(&info[i],sizeof(info[i]),1
c语言课程设计_学生成绩管理系统 来自淘豆网www.taodocs.com转载请标明出处.