鏈表學生管理系統c語言
發布時間: 2025-02-24 14:46:10
A. c語言設計一個學生學籍管理系統,要求文件形式保存,且用到鏈表
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
//鏈表結點結構體聲明
typedefstructsubjects
{
charname[20];
floatscore;
}sub;
typedefstructstudent
{
intnum;
charname[20];
subsubject[3];
structstudent*next;
}stu,*pstu;
#defineSIZEsizeof(stu)
//函數申明
pstuLoadInfo();
voidPrintMenu();
pstuAddStu(pstu);
pstuDeleStu(pstu);
pstuRwrStu(pstu);
voidFindStu(pstu,char);
voidCount(pstu,char*,float,float);
voidRank(pstu,char*);
voidSaveQuit(pstu);
//主函數
intmain()
{
floatscore1,score2;
charn,j;
charsubname[20];
pstuhead,ptr;
head=LoadInfo();
ptr=head->next;
//創建菜單,進入選擇循環
while(1)
{
PrintMenu();
printf("請輸入您的選擇編號:");
scanf("%d",&n);
getchar();
switch(n)
{
case1:
{
system("cls");
j=0;
while(4!=j)
{
printf("歡迎進入信息管理版塊! ");
printf("