1樓:
#include
#include
#include
using namespace std;
typedef struct student student;
class cstudent
~cstudent()
}student readdata(int model); // model = 1:不讀取學號,2:不讀取姓名,其他,讀取所有資訊
void entering();
bool insert(const student &astu);
student *findid(unsigned id) const;
student *findname(const string &name) const;
student *find***(const string &***) const;
student *finddormitory(const string &dormitory) const;
unsigned boys() const;
unsigned girls() const;
unsigned headcount() const;
bool eraseid();
bool erasename();
bool modifyid();
bool modifyname();
void show() const;
void query() const;
void friend statistics(const cstudent &aclss);
void friend erase(cstudent &aclss);
void friend modify(cstudent &aclss);
};string readstring()
student cstudent::readdata(int model)
if(model != 2)
cin >> tmp.m_age;
cout << "性 別: ";
tmp.m_*** = readstring();
cout << "住 址: ";
tmp.m_address = readstring();
cout << "****: ";
tmp.m_contact =readstring();
cout << "寢 室: ";
tmp.m_dormitory = readstring();
return tmp;
}void cstudent::entering()
else cout << "重複的學號:" << tmp.m_id << endl;
cout << "學號(0 to return): ";
cin >> tmp.m_id;}}
student *cstudent::findid(unsigned id) const
student *cstudent::findname(const string &name) const
student *cstudent::find***(const string &***) const
student *cstudent::finddormitory(const string &dormitory) const
bool cstudent::insert(const student &astu)
while(p->m_next)
if(p->m_next->m_id > astu.m_id)
p = p->m_next;
}p->m_next = new student(astu);
p->m_next->m_next = null;
return true;
}unsigned cstudent::boys() const
unsigned cstudent::girls() const
unsigned cstudent::headcount() const
bool cstudent::eraseid()
q = p->m_next;
p->m_next = q->m_next;
delete q;
return true;
}bool cstudent::erasename()
q = p->m_next;
p->m_next = q->m_next;
delete q;
return true;
}bool cstudent::modifyid()
tmp = readdata(1);
tmp.m_id = id;
*p = tmp;
return true;
}bool cstudent::modifyname()
tmp = readdata(2);
tmp.m_name = name;
*p = tmp;
return true;
}int menu() while(choice 0 || choice > 7);
return choice;
}void show(student *p)
void cstudent::show() const
void cstudent::query() const
system("pause");
}void statistics(const cstudent &a)
void erase(cstudent &a)
break;
case 2 : cout << "請輸入姓名:"; name = readstring();
if(p = a.findname(name))
break;
case 0 : return;
default : cout << "選擇錯誤。\n";
}system("pause");
}void modify(cstudent &a)
system("pause");
}int main()
}while(an);
return 0;}
2樓:匿名使用者
這個是課程設計把?童鞋?
用c++編寫一個學生資訊管理系統,主要用來管理學生基本資訊及成績資訊。系統功能模組如下圖: 50
3樓:銀杏哀
#include
#include
#include
using namespace std;
struct student
;void input(student s,int n);
void count(student s,int n);
void output(student s,int n);
void sort(student s,int n);
void rate(student s,int n);
void searchnum(student s,int n);
void searchname(student s,int n);
#include "lab5.h"
#include
void input(student s,int n)}cout<<"共輸入"x;
for(i=0;i>flag;}}
void searchname(student s,int n)}void rate(student s,int n)cout<<"優秀人數為:"<>n;
while(n<0||n>50)
int i,flag=1;
while(flag)
cout< switch(i) }return 0;} 4樓:︶ㄣ友誼 同學 請自己寫 如果不喜歡程式設計 建議現在就換專業 5樓:上帝的帝 這種管理bai系統是最簡單的了。du如果寫資料庫那稍微zhi煩一點,見dao到你們下面說的話版了,應該是權寫記憶體,那就很簡答了。 首先,定義一個結構體存放學生的幾個資訊,通過cin>>輸入你所需要的資訊。定義一個結構體陣列,將每個結構體放進去。 然後排序,通過for迴圈遍歷,資訊,用氣泡排序按學號排序。 查詢,遍歷時,if你要查詢的學號,輸出就ok了修改,查詢時,找到再進行修改就好了。 統計,也是類似 退出,呼叫exit(0);函式。 宇宙皇帝澤澤 學生查成績,直接等待學校公佈成績答案就可以了 小馬哥 考試成績這種別人一般是不知道的,你最好還是自己打 問老師吧,問班主任是最快最省事的方法,讓老師幫你查一下成績很快的。 環語夢 看作業本做的對與不對,寫的字是否公證,平時都做的很好的那就是優等生了。 海是島的盡頭 現在有很多地方就是他... 在excel中進行中國式排名 所謂中國式排名,是指排名時如果出現並列的情況,並列者不佔用名次。例如有兩個並列第2名,則下一個名次還是為第3 名,而不是排到第4 名,這似乎更符合中國人的習慣。而在excel中用rank函式排序時,並列者將佔用名次,因而會導致後面有的名次會出現空缺。在許多情況下,我們可... 下面是摘錄家長的做法,你看看也無妨。孩子成績差,最簡單可行的方法 有沒有一種每個家庭都好操作的簡單易行的方法。教無定法,每個家庭不同,學生不同,但教育是有規律可循的,教育的法則是相通的。下面將要和大家分享的當代最行之有效的簡單可行的教育方法。方法之一 溝通。隨著現在年齡的增長,家長與子女的溝通 交流...怎麼查學生成績,如何查詢學生的考試成績?
用excel考試成績排序輸入的公式IF M4RANK M4,M 4 M 43,0 為何成績相同後,總是名次序列不相連
考試成績只打學生本人的還是全校的