fread(&stu[num],1,sizeof(struct student),fp);
num++;
}
num--;
fclose(fp);
printf(\
printf(\现有 %d 个学生的成绩:\\n\显示\现有 NUM个学生的成绩:\
printf(\
output();
}
void weihu() /*维护界面函数 */
{
char c1;
while(1)
{
printf(\
printf(\维护 *\\n\
printf(\新增 *\\n\新增*/
printf(\删除 *\\n\删除(按学号)*/
printf(\修改 *\\n\修改*/
printf(\返回 *\\n\返回*/
printf(\
printf(\请选择:\\n\请选择:*/
c1=getchar();
getchar();
if(c1=='9')
break;
switch(c1)
{
case '1':
new1();
break;
case '2':
delete1();
case '3':
xiugai();
break;
default:
printf(\选择有误,请重选!\\n\选择有误,请重选!\
}
}
}
void new1() /*新增一个学生成绩函数 */
{
printf(\请输入学号:\显示\请输入学号:\
gets(stu[num].no);
printf(\姓名:\显示\姓名:\
gets(stu[num].name);
printf(\班级:\显示\班级:\
gets(stu[num].grade);
printf(\专业:\显示\专业:\
gets(stu[num].pro);
printf(\入学年:\显示\入学年\
scanf(\
printf(\语言成绩:\显示\语言成绩\
scanf(\
printf(\高数成绩:\显示\高数成绩\
scanf(\
printf(\大物成绩:\显示\大物成绩\
scanf(\
printf(\电路成绩:\显示\电路成绩\
scanf(\
printf(\模电成绩:\显示\模电成绩\
相关推荐: