設計乙個學籍管理系統,基本功能包括:
1.輸入學生基本資訊
2.查詢學生資訊(1.按學號2.按姓名)
3.刪除學生資訊(1.按學號2.按姓名)
4.學生資訊排序(1.按學號2.按姓名)
5.修改學生基本資訊
6.輸出學生資訊
7.儲存學生資訊
0.退出程式
注:由於知識有限,該系統暫時規定只輸入3個學生資料,今後會改良成可隨機處理任意多個學生的資料
void
enter
(struct student stu,
int n)
}}
int count=0;
//計數器記錄學生個數
void
input
(struct student stu,
int n)
void
seek
(struct student stu,
int n)
else
//陣列下標等於學生數,則沒有找到該學生
printf
("\t\t\t\t查無此人\n");
system
("pause");
system
("cls");
}break
;case2:
else
printf
("\t\t\t\t查無此人\n");
system
("pause");
system
("cls");
}break;}
}
void
delect
(struct student stu,
int n)
}else
}break
;case2:
}else}}
}
void
sort
(struct student stu,
int n)}}
}break
;case2:
}}}}
printf
("\t\t\t\t已按要求完成排序\n");
system
("pause");
system
("cls");
}
七、輸出void
revise
(struct student stu,
int n)
}else
}
void
output
(struct student stu,
int n)
void
keep
(struct student stu,
int n)
for(i=
0;i)fprintf
(fp,
"%d\t%s\t%d\t%c\n"
,stu[i]
.number,stu[i]
.name,stu[i]
.age,stu[i]
.***)
;//呼叫格式化寫fprintf()函式,將陣列中內容寫入檔案
fclose
(fp)
;printf
("\t\t\t\t檔案已儲存\n");
system
("pause");
system
("cls");
}
int
main()
如發現文章有誤,請各大佬們不吝賜教struct student
;//定義結構體student
學生管理系統C語言版
本程式若執行失敗請關閉重試,若再次失敗可以自行先建立乙個資料夾 d 000 studentinfo.txt 邊學鍊錶,結構體,指標邊做的程式,加起來學做了48小時,所以肯定存在很多不足,這是第二版,請多包含。define crt secure no warnings include include ...
C語言 學籍管理系統
2.多檔案管理 3.鍊錶 4.檔案儲存 5.加密 附錄主介面 管理員登入 管理老師資訊 管理學生資訊 新增學生 成績查詢 介面實現由 控制選擇,enter鍵確認。這裡用到了c語言游標移動函式gotoxy gotoxy 函式定義 void gotoxy int x,int y setconsolecu...
c語言版匯款系統
include include include include define n maxrec no 100 define file data path c define maxline 256 struct record typedef struct record record record rs...