-
大小: 4KB文件類型: .rar金幣: 1下載: 0 次發(fā)布日期: 2021-01-03
- 語言: C/C++
- 標(biāo)簽:
資源簡(jiǎn)介
struct student
{
char name[20]; //學(xué)生的姓名
long int num; //學(xué)生的學(xué)號(hào)
int classroom,grade; //學(xué)生的班級(jí)和年級(jí)
double english,math,c; //學(xué)生的各科成績(jī)
double sum; //學(xué)生的總成績(jī)
double average;//學(xué)生的平均成績(jī)
int order; //學(xué)生的排名
struct student *next;
};
代碼片段和文件信息
#include
#include
#include?
#include
#include
using?namespace?std;
int?n;????//定義一個(gè)全局變量統(tǒng)計(jì)學(xué)生人數(shù)
struct?student
{
char?name[20];????//學(xué)生的姓名
long?int?num;?????//學(xué)生的學(xué)號(hào)
int?classroomgrade;????//學(xué)生的班級(jí)和年級(jí)
double?englishmathc;??//學(xué)生的各科成績(jī)
double?sum;????//學(xué)生的總成績(jī)
double?average;//學(xué)生的平均成績(jī)
int?order;?????//學(xué)生的排名
struct?student?*next;
};
student?*first(student?*head)????//建立頭指針
{
head=new?student;
head->next=NULL;
return?head;
}
/*************************************************************************/
//1.學(xué)生基本信息輸入包括成績(jī)
void?input(student?*head)
{
student?*p=new?student;
student?*q=NULL;
cout<<“\n\n????請(qǐng)輸入學(xué)生的姓名:“;
cin>>p->name;
cout<<“\n????請(qǐng)輸入學(xué)生的學(xué)號(hào):“;
cin>>p->num;
while(p->num<0||p->num>1999999999)????
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????16816??2011-08-12?22:52??學(xué)生成績(jī)與獎(jiǎng)學(xué)金評(píng)定系統(tǒng).cpp
?????文件????????461??2011-08-23?16:52??學(xué)生信息(讀取).txt
?????文件???????1095??2011-08-23?16:52??學(xué)生信息(保存).txt
?????文件?????????32??2011-08-23?16:52??評(píng)定結(jié)果.txt
-----------?---------??----------?-----??----
????????????????18404????????????????????4
評(píng)論
共有 條評(píng)論