cout<
<
<
int list::delstu(char *n) {
if(first==0) {cout<<\无数据!\ student *temp=first; student *p;
if(strcmp(first->outname(),n)==0) { first=first->next;delete temp; cout<<\删除成功\\n\
else for(;temp->next!=NULL;temp=temp->next) {if(strcmp(temp->next->outname(),n)==0)
{p=temp->next;temp->next=temp->next->next;delete p; cout<<\删除成功\\n\
cout<<\查无此人,删除失败\\n\ return 0; }
int list::delstu1(char *n) {
if(first==0) {cout<<\无数据!\ student *temp=first; student *p;
if(strcmp(first->outid(),n)==0) { first=first->next;delete temp; cout<<\删除成功\\n\ else while(temp->next!=NULL)
{if(strcmp(temp->next->outid(),n)==0)
{p=temp->next;temp->next=temp->next->next;delete p; cout<<\删除成功\\n\ else temp=temp->next;}
cout<<\查无此人,删除失败\\n\ return 0; }
void list::think() {
if(first==0) {cout<<\无数据!\ int i=0;
student *p=first; while (p!=NULL) {
p=p->next; i++; }
totoal=i;
cout<<\人数:\cout<<\数学\\n\
cout<<\最高分:\最低分:\平均分:\av(0); ev(0);
cout<<\英语\\n\
cout<<\最高分:\最低分:\平均分:\av(1); ev(1);
cout<<\政治\\n\
cout<<\最高分:\最低分:\平均分:\av(2); ev(2);
cout<<\程序设计基础\\n\
cout<<\最高分:\最低分:\平均分:\av(3); ev(3);
cout<<\物理\\n\
cout<<\最高分:\最低分:\平均分:\av(4); ev(4); }
double list::hi(int i)
{
high[i]=0.00;
student *temp=first; while(temp!=0)
{if(temp->outgrade(i)>high[i]) high[i]=temp->outgrade(i); temp=temp->next; }
return high[i]; }
double list::lo(int i) {
low[i]=100;
student *temp=first;while(temp!=0) {if(temp->outgrade(i)
return low[i]; }
void list::av(int i) {
double aver=0;
student *temp=first; while(temp!=NULL) {
aver+=temp->outgrade(i); temp=temp->next; }
cout<
void list::ev(int i)
{ int a=0,b=0,c=0,d=0,e=0,f=0; student *temp=first;while(temp!=0) {switch((int)temp->outgrade(i)/10) {
case 10:a++;break;case 9:a++;break; case 8:b++;break;case 7:c++;break; case 6:d++;break;case 5:e++;break; default:f++; }
temp=temp->next; }
cout<<\的人数:\的人数:\的人数:\<<\的人数:\的人数:\以下的人数:\<<\及格的人数:\不及格的人数:\}
void list::search(char s[10],int n) {
student *temp=first;for(;temp!=NULL;temp=temp->next) if(strcmp(temp->outname(),s)==0)temp->intgrade(n); }
void list::search1(char s[20],int n) {
student *temp=first;for(;temp!=NULL;temp=temp->next) if(strcmp(temp->outid(),s)==0)temp->intgrade(n); }
void list::outsum(char *n) {
if(first==0) {cout<<\无数据!\
student *temp=first;for(;temp!=NULL;temp=temp->next) if(strcmp(temp->outname(),n)==0) {
cout<
setw(10)<<\平均成绩\
cout<
<