希望大家学习好
#include
#include "string.h"
#include
#define N 10
struct date
{int year;
int month ;
int day;
};
struct student
{char num[3];
char name[3];
struct date brithday;
char collage[10];
float score[5];
float allscore;
float average;
} str[100];
FILE *fp;
wenjian()
{ FILE *fp;
char filenname[10];
printf("请输入所用的文件名:\n");
scanf("%s",filenname);
if ((fp=fopen(filenname,"w"))==NULL)
{ printf("无法打开此文件\n");
exit(0);
}
}
display()
{ int i,j;
printf("\n ********欢迎进入学生成绩管理系统********\n\n");
printf("请输入10名同学的学号、姓名、出生日期、所在系、5门课程及成绩:\n\n");
for (i=0;i<=N-1;i++)
{
printf ("请输入第%d名学生的信息:\n",i+1);
printf (" 学号:");
scanf("%s",str[i].num);
printf(" 姓名:");