#include
#include
#include
struct student
;void getinformation(struct student *human);
void addinformation(struct student **head);
void printfinformation(struct student *human);
void choose(struct student *head);
void addresuls(struct student **head);
void getresuls(struct student *human);
void printfresuls(struct student *human);
void serchinformation(struct student *head);
void serchresuls(struct student **head);
void many(struct student *head);
void change(struct student **head);
void changehuman(struct student *human);
void changemenu();
void delete(struct student **head);
void sort(struct student **head,struct student *hum);
int compelete(struct student *head,struct student *human);
void statistic(struct student *head );
void readdata (struct student **head);
void writedata (struct student *head);
void release(struct student **head);
void adddata(struct
student *head);
int main()
void mainmenu()
void choose(struct student *head)}}
void addinformation(struct student **head)
getinformation(human);
if (compelete(*head,human) == 0)
else
else
temp->next = human;
human->next = null;}}
}int compelete(struct student *head,struct student *human)
return z;
}void release(struct student **head)
*head = null;}}
void getinformation(struct student *human)
void printfinformation(struct student *human)
void printfresuls(struct student *human)
void serchinformation(struct student *head)
human = human -> next;
}printf("該學生資訊不存在,請重新查詢\n");
}void serchresuls(struct student **head)
human = human->next;
}printf("該學生資訊不存在,請先進行錄入!\n");
}void many(struct student *head)
printf("學生人數%d人",total);
}void change(struct student **head)
human = human->next;
}printf("該學生資訊不存在,請重新查詢\n");
}void changehuman(struct student *human)
}void changemenu()
void delete(struct student **head)
if (temp==null)
else
free(human);
temp=null;
}else
}void sort(struct student **head,struct student *hum)} }
for (p = *head; strcmp(p->m_strnumber,hum->m_strnumber) !=0; p = p->next)
printf("英語成績排名:%d\n",count1-1);
for (endpt = null; endpt != *head; endpt = p) }}
for (p = *head; strcmp(p->m_strnumber,hum->m_strnumber) !=0; p = p->next)
printf("數學成績排名:%d\n",count2-1);
for (endpt = null; endpt != *head; endpt = p) }}
p1 = *head;
*head = p1->next;
free (p1);
p1 = null;
for (p = *head; strcmp(p->m_strnumber,hum->m_strnumber) !=0; p = p->next)
printf("計算機成績排名:%d\n",count3);
}void statistic(struct student *head )
}printf("共有%d人不合格",a);
}void readdata(struct student **head)
fseek(fp,45l,seek_set);
//將文字讀取掉
c = fgetc(fp);
if (c==eof)
//判斷檔案是否為空
else
if (*head == null)
else
temp->next = human;
human->next = null;
}fscanf(fp,"%s", human->m_strname);
fscanf(fp,"%s",human->m_str***);
fscanf(fp,"%s",human->m_strnumber);
fscanf(fp,"%lf",&human->m_fenglish);
fscanf(fp,"%lf",&human->m_fmath);
fscanf(fp,"%lf",&human->m_fcomputer);}}
fclose(fp);
}void writedata (struct student *head)
fprintf(fp,"姓名\t性別\t學號\t英語成績\t數學成績\t計算機成績");
while(human!=null)
fclose(fp);
}
C語言學生管理系統
include include define arfile usr.ar struct arstruct void removeuser if fp fopen arfile,r null memset ar,0x00,sizeof ar printf 請輸入員工姓名 memset name,0x0...
C語言學生資訊管理系統(動態鍊錶版)
大一上學期的期末作業,只記得當時弄了好長時間。在寫 的過程中,能發現很多問題,錯誤,折磨人的很。不過也確實學到了好多東西。這其中,有王瑤哥和菲菲姐的熱心幫助。在此謝謝他們嘍 當然,現在看來,還有很多可以優化的地方。本程式功能還算齊全,bug還有待發現,沒有包含輸入檢測機制。精力有限,後悔當年沒有養成...
用鍊錶做的簡單c語言學生管理系統
用鍊錶做的簡單c語言學生管理系統 裡面有用到簡單的檔案操作 include include struct stu struct stu creatlink t 建立鍊錶 void typelink t struct stu phead 列印裡面的內容 struct stu charulink t s...