基礎的很簡單的學生管理系統!!

2021-07-22 02:17:34 字數 2203 閱讀 4125

#define _crt_secure_no_warnings

#include#includeusing namespace std;

int f, g, h, m, n;

string r;

class student

} void xg(int l)

else if (n == p2.i)

else if (n == p3.i)

else if (n == p4.i)

} }}p1, p2, p3, p4;

void main(), w[10] = , t[10] = ;

int *k=null;

student *p = new student();

class student *head = null; //頭指標

cout << "按順序入4個學號:"<> p1.i;

cin >> p2.i;

cin >> p3.i;

cin >> p4.i;

cout<<"按順序輸入4個姓名:"<> p1.j;

cin >> p2.j;

cin >> p3.j;

cin >> p4.j;

cout << "按順序輸入語文成績:" << endl;

cin >> p1.a;

cin >> p2.a;

cin >> p3.a;

cin >> p4.a;

cout << "按順序輸入英語成績:" << endl;

cin >> p1.b;

cin >> p2.b;

cin >> p3.b;

cin >> p4.b;

cout << "按順序輸入數學成績:" << endl;

cin >> p1.c;

cin >> p2.c;

cin >> p3.c;

cin >> p4.c;

head = &p1;

p1.next = &p2;

p2.next = &p3;

p3.next = &p4;

p4.next = null;

cout << "學號列表" << endl;

while (head != null)

head = &p1;

cout << "姓名列表" << endl;

while (head != null)

head = &p1;

cout << "語文成績列表" << endl;

while (head != null)

head = &p1;

q[0] = p1.a;

q[1] = p2.a;

q[2] = p3.a;

q[3] = p4.a;

k = q;

for (g = 0; g<10; g++)

} }cout << "語文最高分:" << q[0] << endl;

cout << "英語成績列表" << endl;

while (head != null)

head = &p1;

w[0] = p1.b;

w[1] = p2.b;

w[2] = p3.b;

w[3] = p4.b;

k = w;

for (g = 0; g<10; g++)

} }cout << "英語最高分:" << w[0] << endl;

cout << "數學成績列表" << endl;

while (head != null)

t[0] = p1.c;

t[1] = p2.c;

t[2] = p3.c;

t[3] = p4.c;

k = t;

for (g = 0; g<10; g++)

} }cout << "數學最高分:" << t[0] << endl;

cout << "是否修改學生資訊 1:是 ,2:否" << endl;

cin >> m;

p->xg(m);

while (1)

else if (r == p2.j)

else if (r == p3.j)

else if (r == p4.j)

break;

} }system("pause");

}

c 編寫簡單的學生管理系統

心得 在查詢資料時,如果查詢的內容只是作為某個判斷的條件,直接執行用sqlcommand執行語句,如果要在lable或者datagirdview中顯示出來查詢的結果。此時,分兩種情況 sqldatareader逐條查詢,sqldataadapter結果查詢 問題 在用引數接收combobox資訊時,...

Python編寫簡單的學生管理系統

python編寫簡單的學生管理系統一共兩個檔案,其中乙個定義函式,另乙個是主程式,呼叫函式,執行程式 cms.py 編寫 學生資訊管理系統 要求如下 必須使用自定義函式,完成對程式的模組化 學生資訊至少包含 姓名 年齡 學號,除此以外可以適當新增 必須完成的功能 新增 刪除 修改 查詢 退出 定義乙...

Python簡單學生管理系統

info 顯示功能函式 defmenuprint print 請選擇功能 print 1 增加學員 print 2 刪除學員 print 3 修改學員 print 4 查詢學員 print 5 顯示所有學員 print 6 退出系統 def addinfo 新增學員 global info dict...