C 簡單的成績管理

2022-07-24 17:09:24 字數 1137 閱讀 7950

#include#includeusing namespace std;

struct student;

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

成績排序

m=1,按照名次排序

m=2,按照學號排序

m=3,按照語文成績排序

m=4,按照英語成績排序

m=5,按照計算機成績排序

m=6,按照數學成績排序

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

void sort(int m,struct student *stu,int n)

}}

}else if(m==3)

//排序,計算名次

sort(1,stu,n);

}void update(struct student *stu,int n)

cout<<"請輸入要更改的課程代號1:語文;2:英語;3:計算機;4:數學:"<>sub;

while(sub>4||sub<1)

cout<<"請輸入新成績(1 -100)"<>score;

while(score>100||sub<0)

//按照學號重新排序

sort(2,stu,n);

switch(sub)

//重新排序,計算名次

sort(1,stu,n);

cout<<"成績更改成功!" ;

}/*****************

成績輸出

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

void display(struct student *stu,int n)

struct student *stu =new struct student [n];

//錄入成績

input(stu,n);

cout<<"成績錄入成功!"<>m;

while(m>0&&m<8)

else

printchoice();

cin>>m;

}cout<<"退出系統成功!";

int a;

cin>>a;

return 0;

}

C語言實現簡單的成績管理功能

某專業學生成績資訊儲存在d盤根目錄下,檔名為info.txt,規定學生人數不超過1000,如果學生單科成績小於60,或總分小於210,則為考試沒通過。下面有乙個示例。檔案示例 d盤下面檔案 info.txt 執行結果 所有學生資訊如下 n i 0 while iprintf 以下學生沒有通過考試 n...

C 成績管理系統

以防老師再次叫我們做這些,先寫好乙個在這裡 author 小陳 date 2019 03 17 11 04 17 last by 小陳 last time 2019 03 17 11 58 40 include pch.h include include include using namespac...

學生成績管理(簡單版)

學生成績管理系統 簡單版 要求 儲存50個學生下資訊 學號,姓名,性別,成績1,成績2 計算平均成績,與等級 等級要求自定義 按照平均成績倒序輸出,並且可以統計是否具有重名學生,若有輸出相同個數。include include using namespace std define n 2 intma...