使用單向鍊錶實現學生資訊管理系統

2021-08-14 04:21:58 字數 1249 閱讀 4425

全部**:

實現的功能:

選單介面

please enter your choice:

1) exit.

2) add all students.

3) show all students.

4) add a studeng.

5) remove a studeng.

用來存放學生資訊的結構體

9

//學生分數的結構體

10typedef

struct s

11 score_t;

1617

//學生資訊結構體

18typedef

struct node node;

建立整個鍊錶時,需要先建立乙個頭,煉表頭不儲存資料,只是方便後面訪問鍊錶方便而設定。

20

void creat_list()

21 2829

/***********************************

30 *等待使用者輸入資料,建立鍊錶

31 * ******************************* */

32 do

33 while (strcmp(flag, "y")==0);

4142 printf_main_menu(); //回到主介面

43 }

新增學生每次在鍊錶的頭新增

124 int add_a_stu()

125

刪除學生通過學生的學號(number)來刪除,部分函式**沒有

貼出來,有需要可以去上面的git取完整的**

138

int rm_a_stu()

139

157 cur = cur->next;

158 }

159 free(del);

160 del = null;

161 cur = null;

162printf("rm %s(%d) student succesful!\n", del_stu_name, del_stu_num);

163 printf_main_menu(); //回到主介面

164return

0;165 }

鍊錶實現簡單學生資訊管理

include include include define len sizeof struct stu typedef long long ll struct stu 建立學生資訊的結構體,包含學號,姓名 成績三個子項 struct stu creat 建立乙個鍊錶 if tail null 將尾...

python函式實現學生資訊管理系統

名片管理系統 dict1 i 0 def display menu 選單顯示函式 print 名片管理系統 center 20 print 30 print 1.新增個人名片 end print 2.刪除個人名片 end print 3.修改個人名片 print 4.檢視個人名片 end print...

單鏈表實現學生資訊管理系統

define crt secure no warnings include include include int count 0 typedef struct student typedef struct node node node createlinklist 建立指標鍊錶 headnode ...