c語言文件學生管理
發布時間: 2023-08-17 20:42:50
⑴ 如何用c語言製作一個學生信息管理系統,要求以文件形式保存
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
//鏈表結點結構體聲明
typedef struct subjects
{
char name[20];
float score;
}sub;
typedef struct student
{
int num;
char name[20];
sub subject[3];
struct student* next;
}stu,*pstu;
#define SIZE sizeof(stu)
//函數申明
pstu LoadInfo();
void PrintMenu();
pstu AddStu(pstu );
pstu DeleStu(pstu );
pstu RwrStu(pstu );
void FindStu(pstu , char );
void Count(pstu ,char * ,float ,float );
void Rank(pstu ,char * );
void SaveQuit(pstu );
//創建菜單,進入選擇循環
while(1)
{
PrintMenu();
printf("請輸入您的選擇編號:");
scanf("%d",&n);
getchar();
switch(n)
{
case 1:
{
system("cls");
j=0;
while(4!=j)
{
printf("歡迎進入信息管理版塊! ");
printf("