最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

C語言學(xué)生管理系統(tǒng)代碼(部分)

2023-04-09 21:33 作者:來追我啊呵呵  | 我要投稿

#include "student_mag.h"


int main()

{

Node* head = malloc(sizeof(Node));

head->next = NULL;

while (1)

{

welcome();


char ch = _getch();


switch (ch)

{

case '1':

Inputstudent(head);? //錄入學(xué)生信息

break;

case '2':

Printstudent(head);? //打印學(xué)生信息

break;

case '3':

Countstudent(head);? //統(tǒng)計學(xué)生信息

break;

case '4':

Findstudent(head);? //查找學(xué)生信息

break;

case '5':

break;

case '6':

break;

case '7':

break;

default:

break;


}

}


return 0;

}


void Inputstudent(Node* head)

{

Node* fresh = malloc(sizeof(Node));

fresh->next = NULL;

printf("請輸入學(xué)生信息\n");

scanf("%d%s%d", &fresh->stu.num, fresh->stu.name, &fresh->stu.sorce);

Node* move = head;

while (move->next!=NULL)

{

? move = move->next;

}

move->next = fresh;


system("pause");

system("cls");


}


void Printstudent(Node* head)

{

Node* move = head->next;

while (move!=NULL)

{??

printf("學(xué)號:%d,姓名:%s,分數(shù):%d\n", move->stu.num, move->stu.name, move->stu.sorce);

move = move->next;

}

system("pause");

system("cls");

}


void Countstudent(Node* head)

{? ?

int count = 0;

Node* move = head->next;

while (move!=NULL)

{

count++;

move = move->next;

}

printf("學(xué)生人數(shù)為%d\n", count);

system("pause");

system("cls");

}

void Findstudent(Node* head)

{? ?

printf("請輸入學(xué)生學(xué)號:");

int stunum;

scanf("%d", &stunum);

Node* move = head->next;

while (move!=NULL)

{

if (stunum == move->stu.num)

{

printf("學(xué)號:%d,姓名:%s,成績%d\n", move->stu.num, move->stu.name, move->stu.sorce);

system("pause");

system("cls");

return;

}

move = move->next;

}

printf("未找到學(xué)生\n");

system("pause");

system("cls");

}


C語言學(xué)生管理系統(tǒng)代碼(部分)的評論 (共 條)

分享到微博請遵守國家法律
华蓥市| 本溪| 吴忠市| 繁峙县| 瑞金市| 黄龙县| 叶城县| 宁安市| 西林县| 江油市| 南川市| 广州市| 铜鼓县| 来宾市| 峡江县| 四川省| 新龙县| 遂平县| 平阳县| 邳州市| 宝丰县| 包头市| 中宁县| 大化| 旅游| 余庆县| 新昌县| 通河县| 来安县| 黑龙江省| 肇州县| 屏南县| 瑞金市| 凌云县| 凯里市| 扎赉特旗| 大英县| 嘉峪关市| 天柱县| 南和县| 浠水县|