當前位置:首頁 » 編程語言 » c語言學生管理系統論文
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

c語言學生管理系統論文

發布時間: 2022-02-04 13:52:28

c語言學生成績管理系統

這么多功能,網上查查有沒有例子; 如果沒有,只能付費讓別人做了

⑵ 畢業設計管理系統的c語言實現

想當年我做的課題就是這個,幾乎一模一樣。到現在我還保留這源代碼呢,珍貴的資料啊。

⑶ 基於C語言的學生成績管理系統的研究意義與發展

你要的是論文?

⑷ 求一篇人事管理系統的畢業論文,附上C語言編寫的可運行程序代碼

你好的!

⑴ 首先就不要有馬上畢業,最後一次花點錢就得了的想法
⑵ 只有自己寫論文,做設計才能順利的畢業
⑶ 在這里我給出方法,以及相關資料尋找的網址,請認真閱讀
⑷ 否則,真的可能導致預想不到的後果!
====================================================================

❶ 中國知網也好、萬方數據也好都有大量的原創論文!
❷ 並且,大部分的院校都有免費的介面!
❸ 如果真沒有免費的介面,那就網路知道懸賞求助下載吧!
❹ 要是要外文的論文准備翻譯的話,最好的辦法就是【谷歌學術】
❺ 需要什麼語言的論文直接就用相應的語言搜索!100% 能找到類似的!
❻ 源代碼:51cto或者CSDN下載!

【友情提示】==================論文寫作方法===========================

❶ 其實,原創的論文網上沒有免費為你代謝的!誰願意花時間給你寫這個呢?難道你在空閑的時間原以為別人提供這種毫無意義的服務么?所以:還不如自己寫。主要是網上的不可靠因素太多,萬一碰到騙人的,就不上算了。
❷ 寫作論文的簡單方法,首先大概確定自己的選題【這個很可能老師已經給你確定了】,然後在網上查找幾份類似的文章。
❸ 通讀一些相關資料,對這方面的內容有個大概的了解!看看別人都從哪些方面寫這個東西!
❹ 參照你們學校的論文的格式,列出提綱,接著要將提綱給你們老師看看,再修改。等老師同意你這個提綱之後,你就可以補充內容!
❺ 也可以把這幾份論文綜合一下,從每篇論文上復制一部分,組成一篇新的文章!然後把按自己的語言把每一部分換下句式或詞,經過換詞不換意的辦法處理後,網上就查不到了!
❻ 最後,到萬方等資料庫進行檢測【這里便宜啊,每一萬字才1塊錢】,將掃紅部分進行再次修改!
❼ 祝你順利完成論文!

⑸ c語言學生成績管理系統求個原創!

http://blog.csdn.net/odaynot/article/details/7942497
這個是我寫的,你可以看看。

⑹ 學生信息管理系統(C語言版)

#include "stdio.h"
#include "bios.h"
#include "conio.h"
#include "STRING.H"
#include "DOS.h"
#include "process.h"
#include "stdlib.h"
#include "math.h"
#define key_down 80
#define key_up 72
#define key_esc 1
#define key_alt_f 33
#define key_alt_x 45
#define key_enter 28
#define key_alt_c 46
#define key_alt_e 18
#define key_alt_s 31
#define key_alt_d 32
#define key_alt_r 19
#define key_alt_p 25
#define key_alt_o 24
struct student
{
char name[20];
long num;
char age[2];
char sex[4];
char xibie[16];
char jiguan[50];
struct{
float chinese;
float english;
float math;
float total;
float ave;}score;
struct student *next;
};
struct student agent[50];
struct student *head,*this1,*new1,*new2,*stud;
char numstr[40]={' ',' '};
int n=0;
int r=0;
int k=0;
long num;
int get_key();
void box(int startx,int starty,int high,int width);
void new1name(void),listall(void),wfile(void),rfile(void);
struct student *insert(struct student *head ,struct student *stud);
void cjlr(),cjtj(),cjpx(),cxxs(),list(),cxcj();
void del();
int mmm();
int nnn();
void ab();
mmm()
{char aaa[6],bbb[6];
char d; //int r=0;
int i=0;
FILE *fp;
char a[6];
char b[6];
clrscr();
if((fp=fopen("file1","r"))==NULL)
{ window(1,1,80,25);
textbackground(1);
textcolor(0);
clrscr();
window(20,8,60,20);
textbackground(14);
textcolor(0);
clrscr();
gotoxy(8,2);
cprintf("NO UER!");
fclose(fp);
fp=fopen("file1","w");
gotoxy(2,4);
printf("Please input name:");
gets(a);fwrite(a,6,1,fp);
gotoxy(2,8);
printf("Please input key:");
gets(b); fwrite(b,6,1,fp);
fclose(fp);
ab();
}
else
{ window(1,1,80,25);
textbackground(1);
textcolor(0);
clrscr();
window(20,8,60,20);
textbackground(14);
textcolor(0);
clrscr();
gotoxy(8,2);
cprintf("Input Your Name And Password:");
gotoxy(2,8);
cprintf(" PWD:");
gotoxy(2,4);
cprintf("NAME:");
scanf("%s",aaa);

gotoxy(7,8);
while(d=getch())
{
if(d==13)
break;
cprintf("*");
bbb[i]=d;
i++;
}
fp=fopen("file1","r");
fread(a,6,1,fp);
fread(b,6,1,fp);
fclose(fp);
for(i=0;i<=5;i++)
{
if(aaa[i]!=a[i] || bbb[i]!=b[i])
exit(0);

}

}

ab();

}
nnn()
{union REGS inregs ,outregs;
inregs.h.ah=0x2a;
intdos(&inregs,&outregs);
window(60,24,80,25);
textbackground(14);
textcolor(0);
clrscr();
cprintf("Data is 2004-%d-%d.\n",outregs.h.dh,outregs.h.dl);
return 0;
}

void ab()
{int i;
clrscr();
window(1,1,80,25);
textbackground(1);
textcolor(0);
clrscr();
window(20,8,62,20);
textbackground(14);
textcolor(128);
clrscr();
for(i=0;i<=11;i++)
{window(20,8+i,62,9+i);
textbackground(i);
textcolor(128+i*2);
clrscr();
cprintf(" Welcome To Students Management System!");
}
getch();
}
main()
{int i,key,x,y,l;
char *menu[]={"input(F)","print1(O)","del(D)","find(C)","print(P)","save(S)","exit(X)"};
char *red[]={"input","printf1","del","find","print","cpoy","exit"};
char *f[]={"xueji luru","chengji luru","chenji tongji","add student","chengji paixu"};
char *c[]={"student","chengji"};
char buf[16*10*4],buf1[16*4];
struct student *stud;
if(k++==0)
mmm();
window(1,2,80,25);
textbackground(15);
textcolor(0);
clrscr();
textbackground(1);
clrscr();
window(1,1,80,1);
textbackground(15);
textcolor(0);
clrscr();
window(1,1,80,2);
gotoxy(1,1);
for(i=0,l=0;i<7;i++)
{x=wherex();
y=wherey();
cprintf(" %s",menu[i]);
l=strlen(menu[i]);
gotoxy(x,y);
textcolor(RED);
cprintf(" %s",red[i]);
x=x+l+4;
gotoxy(x,y);
textcolor(BLACK);
}
nnn();
if(r++==0)
main();
window(1,2,80,25);
while(1)
{
key=0;
while(bioskey(1)==0);
key=get_key();
if(key==key_alt_x) exit(0) ;
if(key==key_alt_s) wfile();
if(key==key_alt_d) del();
if(key==key_alt_r) rfile();
if(key==key_alt_p) listall();
if(key==key_alt_o) list();
if(key==key_alt_f)
{textbackground(0);
textcolor(15);
gotoxy(4,1);
cprintf("%s",menu[0]);
gettext(4,2,18,12,buf);
window(4,2,18,8);
textbackground(15);
textcolor(0);
clrscr();
window(4,2,19,9);
box(1,1,7,16);
for(i=2;i<7;i++)
{gotoxy(2,i);
cprintf("%s",f[i-2]);}
gettext(2,2,18,3,buf1);
textbackground(0);
textcolor(15);
gotoxy(2,2);
cprintf("%s",f[0]);
y=2;
key=get_key();
while(key!=key_alt_x && key!=key_enter && key!=key_esc)
{if(key==key_up || key==key_down)
{puttext(2,y,18,y+1,buf1);
if(key==key_up)
y=y==2?6:y-1;
if(key==key_down)
y=y==6?2:y+1;
gettext(2,y,18,y+1,buf1);
textbackground(0);
textcolor(15);
gotoxy(2,y);
cprintf("%s",f[y-2]);
}
key=get_key();
}
if(key==key_alt_x) exit(0);
if(key==key_enter)
{switch(y-1)
{case 1 : new1name();break;
case 2 : cjlr();break;
case 3 : cjtj();break;
case 4 : insert(head,stud);break;
case 5 : cjpx();break;
default : break;
}
}
}
else
{
window(1,1,80,1);
puttext(2,2,19,10,buf);
textbackground(15);
textcolor(0);
gotoxy(4,1);
cprintf("%s",menu[0]);

}
if(key==key_alt_c)
{textbackground(0);
textcolor(15);
gotoxy(39,1);
cprintf("%s",menu[3]);
gettext(39,2,50,7,buf1);
window(39,2,49,5);
textbackground(15);
textcolor(0);
clrscr();
window(39,2,49,6);
box(39,1,4,11);
for(i=2;i<4;i++)
{
gotoxy(2,i);
cprintf("%s",c[i-2]);
}
gettext(39,2,49,3,buf1);
textbackground(0);
textcolor(15);
gotoxy(2,2);
cprintf("%s",c[0]);
y=2;
key=get_key();
while(key!=key_alt_x&&key!=key_enter&&key!=key_esc)
{if(key==key_up||key==key_down)
{puttext(39,y,49,y+1,buf1);
if(key==key_up)
y=y==2?3:y-1;
if(key==key_down)
y=y==3?2:y+1;
gettext(39,y,49,y+1,buf1);
textbackground(0);
textcolor(15);
gotoxy(2,y);
cprintf("%s",c[y-2]);
}
key=get_key();
}
if(key==key_alt_x) exit(0);
if(key==key_enter)
{switch(y-1)
{case 1: cxxs();break;
case 2: cxcj();break;

default:break;
}
}
}
else
{window(1,1,80,2);
puttext(39,2,49,7,buf);
textbackground(15);
textcolor(0);
gotoxy(39,1);
cprintf("%s",menu[3]);

}
} }

int get_key()
{ union REGS rg;
rg.h.ah=0;
int86(0x16,&rg,&rg);
return rg.h.ah;
}

void box(int startx,int starty,int high,int width)
{ int i;
gotoxy(startx,starty);
putch(0xda);
for(i=starty+1;i<width;i++)
putch(0xc4);
putch(0xbf);
for(i=starty+1;i<high;i++)
{gotoxy(startx,i);
putch(0xb3);
gotoxy(width,i);putch(0xb3);}
gotoxy(startx+1,width);
putch(0xc0);
for(i=startx+1;i<width;i++)
putch(0xc4);
putch(0xd9);
return;
}

/* void new1name(void)
{ int key;
window(1,2,80,25);
textbackground(BLUE);
clrscr();
cprintf("Are you sure input?");
key=get_key();
while(key!=key_alt_x && key!=key_esc)
{
window(1,2,80,25);
textbackground(BLUE);
clrscr();
new1=new2=(struct student *)malloc(sizeof(struct student));
if(head==NULL)
head=new1;
else
{ this1=head;
while(this1->next!=NULL)
this1=this1->next;
this1->next=new1;
}
this1=new1;
printf("\nRecord%d:",n+1);
printf("\nXing Ming:");
gets(this1->name);
printf("\nXue Hao:");
gets(numstr);
this1->num=atol(numstr);
printf("\nNian Ling:");
gets(this1->age);
printf("\nXing Bie:");
gets(this1->sex);
printf("\nXue Yuan:");
gets(this1->xibie);
printf("\nJi Guan:");
gets(this1->jiguan);
n++;
this1->next=NULL;
printf("Are you sure input :Y/N?");
if(getch()=='n')
main();
else
new1name();
}
} */

void new1name(void)
{ int key;
char a;
window(1,2,80,25);
textbackground(BLUE);
clrscr();
cprintf("Are you sure input?");
key=get_key();
while(key!=key_alt_x && key!=key_esc)
{
window(1,2,80,25);
textbackground(BLUE);
clrscr();
new1=new2=(struct student *)malloc(sizeof(struct student));
if(head==NULL)
head=new1;
else
{ this1=head;
while(this1->next!=NULL)
this1=this1->next;
this1->next=new1;
}
this1=new1;
printf("\nRecord%d:",n+1);
printf("\nXing Ming:");
gets(&a);
gets(this1->name);
printf("\nXue Hao:");
gets(numstr);
this1->num=atol(numstr);
printf("\nNian Ling:");
gets(this1->age);
printf("\nXing Bie:");
gets(this1->sex);
printf("\nXue Yuan:");
gets(this1->xibie);
printf("\nJi Guan:");
gets(this1->jiguan);
n++;
this1->next=NULL;
printf("Are you sure input :Y/N?");
if(getch()=='n')
main();
else
new1name();
}
main();
}
/**/
void listall(void)
{
int i=0;
window(1,2,80,25);
textbackground(1);
textcolor(0);
clrscr();
if(head==NULL)
{cprintf("\nempty list .\n");return;
}
this1=head;

do
{ cprintf("\nrecord number %d\n",++i);
cprintf(" name:%s",this1->name);
cprintf(" number:%ld",this1->num);
cprintf(" age:%s",this1->age);
cprintf(" sex:%s",this1->sex);
cprintf(" xibie:%s",this1->xibie);
cprintf(" jiguan:%s",this1->jiguan);
cprintf(" chinese:%6.2f",this1->score.chinese);
cprintf(" english:%6.2f",this1->score.english);
cprintf(" math:%6.2f",this1->score.math);
cprintf(" total:%6.2f",this1->score.total);
cprintf(" ave:%6.2f\n",this1->score.ave);
this1=this1->next;
//this1->next=NULL;
}while(this1!=NULL);
getch();
main();
}
//*insert
struct student *insert(struct student *head,struct student *stud)
{
struct student *p0,*p1,*p2;
p1=head;
p0=stud;
if(head==NULL)
{head=p0;p0->next=NULL;}
else
while((p0->num>p1->num) && (p1->next!=NULL))
{p2=p1;p1=p1->next;}
if(p0->num<=p1->num)
{if(head==p1)
{head=p0;
p0->next=p1;
}
else
{p2->next=p0;
p1->next=p1;
}
}
else
{p1->next=p0;
p0->next=NULL;
}
n=n+1;
return(head);
}
void wfile(void)
{FILE *fptr;
char a[10];
if(n<1)
{printf("\nCan't write empty list.\n");return;}
// char a[10];
cprintf("Please input filename:");
gets(a);
if((fptr=fopen(a,"wb"))==NULL)
printf("\nCant' open file agents.rec\n");
else
{this1=head;
while(this1->next!=NULL)
{fwrite(this1,sizeof(struct student ),1,fptr);
this1=this1->next;
}
// fwrite(this1,sizeof(struct student ),1,fptr);
fclose(fptr);
printf("\nFile of %d records have writen.\n",n);
}
getch();
main();
}
//*rfile
void rfile(void)
{FILE *fptr;
char b[10];
cprintf("Please input filename:");
gets(b);
if((fptr=fopen(b,"rb"))==NULL)
printf("\nCan't open file %s\n",b);
else
{n=0;
head=(struct student *)malloc(sizeof(struct student));
this1=head;
fread(this1,sizeof(struct student),1,fptr);
n++;
while(1)
{if(feof(fptr))
{fclose(fptr);
this1->next=NULL;printf("\nFile read.Total agents is now %d.\n",n);
getch(); main() ;
}else{
this1->next=(struct student *)malloc(sizeof(struct student));
this1=this1->next;
fread(this1,sizeof(struct student),1,fptr);
n++;
}} this1->next=NULL;

//fread(this1,sizeof(struct student),1,fptr);
//n++;
fclose(fptr);
printf("\nFile read.Total agents is now %d.\n",n);
}
getch();
main();
}
//*wfile
/*void wfile(void)
{char a[10];
FILE *fptr;
if(n<1)
{printf("\nCan't write empty list.\n");return;}
cprintf("Please input filename:");
gets(a);
if((fptr=fopen(a,"wb"))==NULL)
{cprintf("\nCant' open file ");puts(a);cprintf("\n");
}
else
{fwrite(agent,sizeof(struct student ),n,fptr);
fclose(fptr);
printf("\nFile of %d records writen.\n",n);
}
getch();
main();
}
//*rfile
void rfile(void)
{FILE *fptr;
char a[10];
cprintf("Please input filename:");
gets(a);
if((fptr=fopen(a,"wb"))==NULL)
{cprintf("\nCan't open file ");puts(a);
}
else
{while(fread(&agent[n],sizeof(agent[n]),1,fptr)==1)
n++;
fclose(fptr);
printf("\nFile read.Total agents is now %d.\n",n);
}
getch();
main();
} */
//*cjlr
void cjlr(void)
{struct student *p1;
long num; char ddd[5];
char ccc[5];
window(1,2,80,25);
textbackground(BLUE);
clrscr();
p1=head;
printf("input the student' number:");
scanf("%ld",&num);
if(head==NULL)
{
printf("\nlist null!\n");
}
p1=head;
while(num!=p1->num && p1->next!=NULL)
{p1=p1->next;}
if(p1->num==num)
{printf("chinese:");
scanf("%f",&p1->score.chinese);
// gets(ccc);printf("\n");
// p1->score.chinese=atof(ccc);
printf("english:");
scanf("%f",&p1->score.english);
// gets(numstr);
//p1->score.english=atof(numstr);
//getch();
printf("math:");
scanf("%s",ddd);
// gets(ddd);
p1->score.math=atof(ddd);
p1->score.total=p1->score.chinese+p1->score.english+p1->score.math;
p1->score.ave=(p1->score.chinese+p1->score.english+p1->score.math)/3.0;
}
getch();
main();
}
//*cjlr
/*void cjlr(void)
{struct student *p1;
long num; char ddd[4];
window(1,2,80,25);
textbackground(BLUE);
clrscr();
p1=head;
printf("input the student' number:");
scanf("%ld",&num);
if(head==NULL)
{
printf("\nlist null!\n");
}
p1=head;
while(num!=p1->num && p1->next!=NULL)
{p1=p1->next;}
if(p1->num==num)
{printf("chinese:");
scanf("%f",p1->score.chinese);
//gets(numstr);
//p1->score.chinese=atof(numstr);
//getch();
printf("english:");
scanf("%f",p1->score.english);
//gets(numstr);
//p1->score.english=atof(numstr);
// getch();
printf("math:");
//scanf("%f",p1->score.math);
gets(ddd);
p1->score.math=atof(ddd);
p1->score.ave=(p1->score.chinese+p1->score.english+p1->score.math)/3.0;
getch();
}
getch();
main();
} */
//*del
void del()
{struct student *p1,*p2;
long num;
window(1,2,80,25);
textbackground(BLUE);
clrscr();
printf("input the del student' number:");
scanf("%ld",&num);
if(head==NULL)
{
printf("\nlist null!\n"); exit(1);
}
p1=head;
while(num!=p1->num && p1->next!=NULL)
{p2=p1;p1=p1->next;
}
if(num==p1->num)
{if(p1==head) head=p1->next;
else
p2->next=p1->next;
printf("the %ld message have del\n",num);
n=n-1;
}
else
printf("No find %ld!\n",num);
getch();
main();
}
//
void cjtj(void)
{struct student *p;
for(p=head;p!=NULL;p=p->next)
{ p->score.total=p->score.chinese+p->score.english+p->score.math;
p->score.ave=p->score.total/3.0;
}
}
//
void cjpx(void)
{
struct student *p,*p1;
int i,j,t;
float temp;
for(i=0;i<n;i++)
{

p=head;
p1=p->next;
if(p->score.total<p1->score.total)
{temp=p->score.total;
p->score.total=p1->score.total;
p1->score.total=temp;
}
}
}
//
void cxxs(void)
{ struct student *p;
char name1[20];
window(1,2,80,25);
textbackground(BLUE);
clrscr();
printf("shu ru yao cha xun de xue sheng de xing ming:");
gets(name1);
for(p=head;p!=NULL;p=p->next)
{if(strcmp(p->name,name1)==0)

{printf("xingming:%s\n",p->name);
printf("xuehao:%ld\n",p->num);
printf("nianling:%s\n",p->age);
printf("xingbie:%s\n",p->sex);
printf("xibie:%s\n",p->xibie);
printf("jiguan:%s\n",p->jiguan);
}
} getch();
main();
}
/*chaxunchengji*/
void cxcj(void)
{ struct student *p;
char name2[20]; int i;
window(1,2,80,25);
textbackground(BLUE);
clrscr();
printf("shu ru yao cha xu de xue sheng de xingming:");
gets(name2);
for(p=head;p!=NULL;p=p->next)
{if(strcmp(p->name,name2)==0)
{printf("xingming:%s\n",p->name);
printf("chinese:%6.2f\n",p->score.chinese);
printf("english:%6.2f\n",p->score.english);
printf("math:%6.2f\n",p->score.math);
printf("total:%6.2f\n",p->score.total);
printf("ave:%6.2f\n",p->score.ave);
}
}getch();
main();
}

/*dayingmugexueshen*/
void list(void)
{ char name3[20];
int i=0;
window(1,2,80,25);
textbackground(BLUE);
clrscr();
printf("shu ru yao da ying de xue sheng xingming:");
gets(name3);
if(head==NULL)
{ printf("\nempty list.\n");
return;
}
for(this1=head;this1!=NULL;this1=this1->next)
{
if(strcmp(this1->name,name3)==0)
{printf("\nnrecord number %d\n",++i);
printf("xingmming:%s\n",this1->name);
printf("xuehao:%ld\n",this1->num);
printf("nianling:%d\n",this1->age);
printf("xingbie:%s\n",this1->sex);
printf("xueyuan:%s\n",this1->xibie);
printf("jiguan:%s\n",this1->jiguan);
printf("chinese:%6.2f\n",this1->score.chinese);
printf("english:%6.2f\n",this1->score.english);
printf("math:%6.2f\n",this1->score.math);
printf("total:%6.2f\n",this1->score.total);
printf("ave:%6.2f\n",this1->score.ave);
}

} getch();
main();
}

⑺ C語言學生信息管理系統程序相映論文!!

#ifndef H_STUDENT_HH
#define H_STUDENT_HH

#include "stdio.h"
#include "string.h"
#include "malloc.h"

#define LEN sizeof(struct message_student) /*一個結構體數組元素的長度*/
#define numsubs 5 /*學科數目*/
typedef struct message_student /*結構體定義*/
{
char number[6];
char name[20];
char sex[4];
float subject[numsubs];
float score;
float average;
int index;
}student;

extern int numstus; /*學生數目*/
extern student *pointer; /*指向結構體數組*/
extern int lens;

int menu_select(); /*函數聲明*/
int openfile(student stu[]);
int findrecord(student stud[]);
int writetotext(student stud[]);
void welcome();
void display1();
void showtable();
void sort(student stu[]);
void deleterecord(student stu[],int i);
void addrecord(student stud[]);
void display(student stud[],int n1,int n2);
void amendrecord(student stud[]);
void count(student stud[]);
void sortnum(student stud[]);
void sortnum2(student stud[]);
void sortname(student stud[]);
void sortname2(student stud[]);
void sortcount(student stud[]);
void sortcount2(student stud[]);
void statistic(student stud[]);
void display1();

#endif

//#include "head.h"
int menu_select()
{
char c;
printf("\n\n");
printf(" | 1. 增加學生記錄 5.統計信息 |\n");
printf(" | 2. 查詢學生記錄 6.打開文件 |\n");
printf(" | 3. 修改學生記錄 7.保存文件 |\n");
printf(" | 4. 學生紀錄排序 8.顯示記錄 |\n");
printf(" | 0.退出系統 |\n");
printf("\n\n");
printf("請選擇(0-8):");
c=getchar();
getchar();
return (c-'0');
}

//#include "head.h"
int findrecord(student stud[]) /*查找信息*/
{
char str[2];
int i,num;
if(numstus==0)
{
printf("沒有可被查找的記錄\n");
return -1;
}
else
{
printf("以何種方式查找?\n1.學號\t2.姓名\t3.名次\n");
gets(str);
if(str[0]=='1') /*按學號查找*/
{
printf("請輸入學號:");
gets(str);
for(i=0;i<=numstus;i++)
if(strcmp(str,stud[i].number)==0)
{
display(stud,i,i);
break;
}
else continue;
}
else if(str[0]=='2') /*按姓名查找*/
{
printf("請輸入姓名:");
gets(str);
for(i=0;i<=numstus;i++)
if(strcmp(str,stud[i].name)==0)
{
display(stud,i,i);
break;
}
else continue;
}
else if(str[0]=='3') /*按名次查找*/
{
printf("請輸入名次:");
scanf("%d",&num);
getchar();
for(i=0;i<=numstus;i++)
if(num==stud[i].index)
{
display(stud,i,i);
break;
}
else continue;
}
if(i>numstus)
{
printf("沒有查找所要的信息。\n");
return -1;
}
return i;
}
}

//#include"head.h"
int openfile(student stu[])
{
int i=0,j;
FILE *fp;
char filename[20],str[2];
if(numstus!=0)
{
printf("已經有記錄存在,是否保存?(y/n)");
gets(str);
if(str[0]=='y'||str[0]=='Y')
writetotext(stu);
}
printf("請輸入文件名:");
gets(filename);
numstus=0;
if((fp=fopen(filename,"rb+"))==NULL)
{
printf("無法打開該文件\n");
return(-1);
}
fscanf(fp,"%d",&numstus);
fgetc(fp);
while(i<numstus)
{
fscanf(fp,"%s",stu[i].number);
fscanf(fp,"%s",stu[i].name);
fscanf(fp,"%s",stu[i].sex);
for(j=0;j<numsubs;j++)
fscanf(fp,"%f",&stu[i].subject[j]);
fscanf(fp,"%f",&stu[i].score);
fscanf(fp,"%f",&stu[i].average);
fscanf(fp,"%d",&stu[i].index);
i++;
}
fclose(fp);
printf("文件讀取成功\n");
printf("是否顯示紀錄?(y/n)");
gets(str);
if(str[0]=='y'||str[0]=='Y')
display(stu,0,numstus-1);
return(0);
}
//#include "head.h"
void sort(student stud[])
{
int i,j=0;
char str[5];
student *p;
p=stud;
if(numstus==0)
{
printf("沒有可供查詢的記錄!");
}
while(1)
{
for(i=0;;i++)
{
printf(" 請輸入查詢方式:");
printf("(直接輸入回車則結束查詢操作)\n");
printf("1.按照學號\t");
printf("2.按照姓名\t");
printf("3.按照名次\n");
gets(str);
if(strlen(str)==0) break;
if(str[0]=='1')
{
printf("請輸入排序次序:\n");
printf("1.升序排列\t");
printf("2.降序排列\n");
gets(str);
if(str[0]=='1')
sortnum2(p);
else
sortnum(p);
display(stud,0,numstus-1);
}
else if(str[0]=='2')
{
printf("請輸入排序次序:\n");
printf("1.升序排列\t");
printf("2.降序排列\n");
gets(str);
if(str[0]=='1')
sortname2(p);
else
sortname(p);
display(stud,0,numstus-1);
}
else if(str[0]=='3')
{
printf("請輸入排序次序:\n");
printf("1.升序排列\t");
printf("2.降序排列\n");
gets(str);
if(str[0]=='1')
sortcount2(p);
else
sortcount(p);
display(stud,0,numstus-1);
}
else printf("請輸入1~3");
printf("是否退出排序?(y/n)");
gets(str);
if(str[0]=='y'||str[0]=='Y') break;
}
return;
}
}
void sortnum(student stud[])
{
int i,j;
student temp;
student *p;
p=stud;
for(i=0;i<numstus;i++)
for(j=0;j<numstus-i-1;j++)
{
if(strcmp(stud[j+1].number,stud[j].number)>0)
{
temp=*(p+j);
*(p+j)=*(p+j+1);
*(p+j+1)=temp;
}
}
}
void sortnum2(student stud[])
{
int i,j;
student temp;
student *p;
p=stud;
for(i=0;i<numstus;i++)
for(j=0;j<numstus-i-1;j++)
{
if(strcmp(stud[j].number,stud[j+1].number)>0)
{
temp=*(p+j);
*(p+j)=*(p+j+1);
*(p+j+1)=temp;
}
}
}
void sortname(student stud[])
{
int i,j;
student temp;
student *p;
p=stud;
for(i=0;i<numstus;i++)
for(j=0;j<numstus-i-1;j++)
{
if(strcmp(stud[j+1].name,stud[j].name)>0)
{
temp=*(p+j);
*(p+j)=*(p+j+1);
*(p+j+1)=temp;
}
}
}
void sortname2(student stud[])
{
int i,j;
student temp;
student *p;
p=stud;
for(i=0;i<numstus;i++)
for(j=0;j<numstus-i-1;j++)
{
if(strcmp(stud[j].name,stud[j+1].name)>0)
{
temp=*(p+j);
*(p+j)=*(p+j+1);
*(p+j+1)=temp;
}
}
}
void sortcount(student stud[])
{
int i,j;
student temp;
student *p;
p=stud;
for(i=0;i<numstus;i++)
for(j=0;j<numstus-i-1;j++)
{
if(stud[j+1].index>stud[j].index)
{
temp=*(p+j);
*(p+j)=*(p+j+1);
*(p+j+1)=temp;
}
}
}
void sortcount2(student stud[])
{
int i,j;
student temp;
student *p;
p=stud;
for(i=0;i<numstus;i++)
for(j=0;j<numstus-i-1;j++)
{
if(stud[j].index>stud[j+1].index)
{
temp=*(p+j);
*(p+j)=*(p+j+1);
*(p+j+1)=temp;
}
}
}
//#include"head.h"
void statistic(student stud[]) /*新增功能,輸出統計信息*/
{
int i,j=0,k=0;
char c1,str[2];
float average[numsubs],sum=0;
if(numstus==0)
printf("沒有可被查找的記錄\n");
else
{
while(1)
{
printf("下面將統計考試成績\n");
printf("請選擇你要統計哪科的成績 1.A\t2.B\t3.C\t4.D\t5.E\n");
c1=getchar();
printf("\t一共有個%d記錄\n",numstus); /*總共記錄數*/
switch(c1)
{
case '1':
for(i=0;i<numstus;i++) /*循環輸入判斷*/
{
sum+=stud[i].subject[0];
if(stud[k].subject[0]>stud[i].subject[0]) k=i;
if(stud[j].subject[0]<stud[i].subject[0]) j=i;
}
average[0]=sum/numstus;
printf("\t科目A的最高分:\n"); /*最高分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[j].number,stud[j].name,stud[j].subject[0]);
printf("\t科目A的最低分是:\n"); /*最低分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[k].number,stud[k].name,stud[k].subject[0]);
printf("\t科目A的平均分是 %5.2f\n",average[0]); /*平均分*/
break;
case '2':
for(i=0;i<numstus;i++) /*循環輸入判斷*/
{
sum+=stud[i].subject[1];
if(stud[k].subject[1]>stud[i].subject[1]) k=i;
if(stud[j].subject[1]<stud[i].subject[1]) j=i;
}
average[1]=sum/numstus;
printf("\t科目B的最高分:\n"); /*最高分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[j].number,stud[j].name,stud[j].subject[1]);
printf("\t科目B的最低分是:\n"); /*最低分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[k].number,stud[k].name,stud[k].subject[1]);
printf("\t科目B的平均分是 %5.2f\n",average[1]); /*平均分*/
break;
case '3':
for(i=0;i<numstus;i++) /*循環輸入判斷*/
{
sum+=stud[i].subject[2];
if(stud[k].subject[2]>stud[i].subject[2]) k=i;
if(stud[j].subject[2]<stud[i].subject[2]) j=i;
}
average[2]=sum/numstus;
printf("\t科目C的最高分:\n"); /*最高分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[j].number,stud[j].name,stud[j].subject[2]);
printf("\t科目C的最低分是:\n"); /*最低分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[k].number,stud[k].name,stud[k].subject[2]);
printf("\t科目C的平均分是 %5.2f\n",average[2]); /*平均分*/
break;
case '4':
for(i=0;i<numstus;i++) /*循環輸入判斷*/
{
sum+=stud[i].subject[3];
if(stud[k].subject[3]>stud[i].subject[3]) k=i;
if(stud[j].subject[3]<stud[i].subject[3]) j=i;
}
average[3]=sum/numstus;
printf("\t科目D的最高分:\n"); /*最高分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[j].number,stud[j].name,stud[j].subject[3]);
printf("\t科目D的最低分是:\n"); /*最低分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[k].number,stud[k].name,stud[k].subject[3]);
printf("\t科目D的平均分是 %5.2f\n",average[3]); /*平均分*/
break;
case '5':
for(i=0;i<numstus;i++) /*循環輸入判斷*/
{
sum+=stud[i].subject[4];
if(stud[k].subject[4]>stud[i].subject[4]) k=i;
if(stud[j].subject[4]<stud[i].subject[4]) j=i;
}
average[4]=sum/numstus;
printf("\t科目E的最高分:\n"); /*最高分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[j].number,stud[j].name,stud[j].subject[4]);
printf("\t科目E的最低分是:\n"); /*最低分*/
printf("\t\t學號:%s 姓名:%s 分數:%.2f\n",stud[k].number,stud[k].name,stud[k].subject[4]);
printf("\t科目E的平均分是 %5.2f\n",average[4]); /*平均分*/
break;
default:printf("輸入錯誤!請輸入1~5之間的數\n");
}
sum=0;
getchar();
printf("是否繼續進行統計?(y/n)");
gets(str);
if(str[0]=='y'||str[0]=='Y') ;
else break;
}
}
}

int writetotext(student stud[]) /*將所有記錄寫入文件*/
{
int i=0,j;
FILE *fp;
char filename[20];
printf("輸入文件名稱:");
gets(filename);
fp=fopen(filename,"w");
fprintf(fp,"%d\n",numstus);
while(i<numstus)
{
fprintf(fp,"%s %s %s ",stud[i].number,stud[i].name,stud[i].sex);
for(j=0;j<numsubs;j++)
fprintf(fp,"%f ",stud[i].subject[j]);
fprintf(fp,"%f %f %d ",stud[i].score,stud[i].average,stud[i].index);
i++;
}
fclose(fp);
printf("已成功存儲!\n");
display(stud,0,numstus-1);
numstus=0;
return 0;
}

void welcome()
{
printf("\t*************************************************************\n");
printf("\t\t\t\t這是一個學生成績管理系統\n\t\t\t\t 傾情奉獻 歡迎使用!\n");
printf("\t*************************************************************\n");

}

void showtable()
{
printf("---------------------------------------------------------------------------------------\n");
printf("學號\t姓名\t性別\tA\tB\tC\tD\tE\t總分\t平均分\t名次\n");
printf("---------------------------------------------------------------------------------------\n");
}

void display(student stud[],int n1,int n2)
{
int i;
showtable(); /*顯示表頭*/
for(i=n1;i<=n2;i++)
printf("%s\t%s\t%s\t%.2f\t%.2f\t%.2f\t%.2f\t%.2f\t%.2f\t%.2f\t%d\t\n",stud[i].number,stud[i].name,stud[i].sex,stud[i].subject[0],stud[i].subject[1],stud[i].subject[2],stud[i].subject[3],stud[i].subject[4],stud[i].score,stud[i].average,stud[i].index);
/*通過循環輸出數據*/

}
void display1()
{
printf("\t\t本系統由計應精英一組親情製作\n\n");
printf("\t\t製作人員列表: (按比劃)\n");
printf("\t\t王慶斌\t\t\t張威\n\t\t李智\t\t\t周在峰\n\t\t楊凱\t\t\t胡楊\n");
printf("\n\n");
getchar();
}

#include<string.h>
void amendrecord(student stud[])
{
char str[5]; /*供用戶輸入*/
int i=-1,j;

if(numstus==0) /*沒有記錄返回*/
printf("沒有可供修改的記錄!");
while(i<0)
{
i=findrecord(stud);
if(i>=0)
{
printf("要刪除這個學生的信息嗎?(y/n)");
gets(str);
if(str[0]=='y'||str[0]=='Y')
{
deleterecord(stud,i);
count(stud);
}
else
{
printf("確定要修改這個學生的信息嗎?(y/n)");
gets(str);
if(str[0]=='y'||str[0]=='Y')
{

printf("下面請重新輸入學生的信息:\n");
printf("請輸入學號:");
gets(stud[i].number);
printf("請輸入姓名:");
gets(stud[i].name);
printf("請輸入性別(男/女 1/0):");
gets(str);
if(str[0]=='0')
strcpy(stud[i].sex,"女");
else
strcpy(stud[i].sex,"男");
stud[i].score=0;
printf("請按順序輸入成績:");
for(j=0;j<numsubs;j++)
{
scanf("%f",&stud[i].subject[j]);
stud[i].score+=stud[i].subject[j];
}
getchar();
stud[i].average=stud[i].score/numsubs;
}
count(stud);
}
display(stud,0,numstus-1);
}
printf("是否繼續進行其他修改?(y/n)\n");
gets(str);
if(str[0]=='y'||str[0]=='Y')
i=-1;
else i=1;
}
}

void deleterecord(student stu[],int i) /*刪除信息*/
{
int j;

while(i>=0)
{
for(j=i;j<numstus;j++)
stu[j]=stu[j+1];
numstus--;
printf("刪除成功!\n");

}
}

void count(student stud[])
{
int i,j;
for(i=0;i<numstus;i++)
{
stud[i].index=1;
for(j=0;j<numstus;j++)
if(stud[j].score>stud[i].score)
stud[i].index++;
}
}

void addrecord(student stud[])
{
int i=0,j,num;
char str[5];
if(numstus!=0)
{
printf("已有記錄存在是否覆蓋?(y/n)\n");
gets(str);
if(str[0]=='Y'||str[0]=='y')
i=0;
else i=numstus;
}

printf("請輸入增加的學生信息條目數:");
scanf("%d",&num);
if(i==0)
numstus=num;
else numstus+=num;
if(numstus>lens)
{
lens+=50;
pointer=(student *)realloc(pointer,lens*LEN);
}
printf("請輸入學生信息:\n");
for(;i<numstus;i++)
{
getchar();
printf("請輸入學號:");
gets(pointer[i].number);
printf("請輸入姓名:");
gets(pointer[i].name);
printf("請輸入性別(男/女 1/0):");
gets(pointer[i].sex);
if(pointer[i].sex[0]=='0') strcpy(pointer[i].sex,"女");
else strcpy(pointer[i].sex,"男");
printf("請輸入各科成績:(按ABCDE的順序):");
stud[i].score=0;
for(j=0;j<numsubs;j++)
{
scanf("%f",&stud[i].subject[j]); /*計算總分*/
stud[i].score+=stud[i].subject[j];
}
stud[i].average=stud[i].score/numsubs; /*計算平均分*/
}
count(stud); /*附名次*/
display(stud,0,numstus-1);
getchar();
}
int numstus;
int lens;
student *pointer;
void main()
{
int i=1;
char str[2];
lens=100;
pointer=(student *)malloc(lens*LEN); /*分配內存*/
numstus=0;
welcome(); /*歡迎界面*/
while(i>0)
{
i=menu_select(); /*控制菜單*/
switch(i)
{
case 1:addrecord(pointer);break; /*增加學生信息*/
case 2:findrecord(pointer);break; /*查詢學生信息*/
case 3:amendrecord(pointer);break; /*修改學生信息*/
case 4:sort(pointer);break; /*學生信息排序*/
case 5:statistic(pointer);break; /*統計信息*/
case 6:openfile(pointer);break; /*打開文件*/
case 7:writetotext(pointer);break; /*保存文件*/
case 8:display(pointer,0,numstus-1);break; /*顯示記錄*/
case 0:
if(numstus!=0) printf("是否保存當前記錄?(y/n)");
gets(str);
if(str[0]=='y'||str[0]=='Y')
writetotext(pointer);
i=-1;break; /*退出系統*/
default:printf("請輸入數字0~8:\n");i=1; /*輸入錯誤*/
}
}
printf("\t\t歡迎再次使用本系統。\n\n");
display1();
}

⑻ 學生成績管理系統c語言編輯的畢業設計 〔20分〕

#include <stdio.h>
#include <stdlib.h>
#include<string.h>

#define MENU_NUM 7
#define N 3

typedef struct s1
{
char no[11]; /*學號由10個字元組成*/
char name[15]; /*學生姓名*/
float score[N]; /*各門課成績*/
float sum; /*總分*/
float average; /*平均分*/
int order; /*名次*/
struct s1 *next; /*指向後繼結點的指針*/
}STUDENT; /*定義結構體類型*/

STUDENT * head=NULL;
void InputData( STUDENT * ptr );
void PrintMenu( );
int Menu_Select( );
void Init( );
void create( );
void print( ) ;
void Delete( );
void append();
void computer();

main()
{
int key;
while(1) {
key=Menu_Select();
switch(key)
{
case 0: Init();
//初試化鏈表。也就是若鏈表不為空則釋放鏈表中所有數據,將head置為空(NULL)
break;
case 1: create();
//創建鏈表,輸入數據
break;
case 2: Delete();
//刪除一個指定學號的記錄數據
break;
case 3: print();
//列印鏈表中所有數據
break;
case 4: computer();
//計算鏈表中所有人的總分和平均分
break;
case 5: append();
//追加一個數據到鏈表的尾部
break;
case 6: Init();
//釋放鏈表
exit(0);
}
};
}

void PrintMenu( )
{
int i;
char * menu[]={
"0. Init list",
"1. Enter list",
"2. Delete a record from list",
"3. Print list",
"4. Compute the score",
"5. Insert record to list",
"6. Quit"
};

printf("\n\n");
for (i=0;i<MENU_NUM;i++)
printf("%s\n",menu[i]);
printf("\nEnter your choice(0-6):");
}

int Menu_Select( )
{
int key;

PrintMenu( );
scanf("%d",&key);
return key;
}

void Init( ) //初始化單鏈表。也就是釋放鏈表中的所有數據
{
STUDENT *p,*ptr;//定義兩個臨時指針變數p,ptr
p=head;ptr=head;//將兩個臨時變數指向頭指針head ;
while(ptr!=NULL)
{
ptr=ptr->next;//ptr指向下一個結構數據
free(p);//釋放p所指向的結構數據的內存
p=ptr;//將p指向ptr所指向的數據
}
head=NULL;//將head指向NULL
}

void create( ) //創建單鏈表
{
STUDENT *pt, *pth=NULL; //定義兩個指針變數:pt指向即將申請新的數據內存,pth指向當前數據
while(1)
{
pt=(STUDENT *)malloc(sizeof(STUDENT));//讓pt指向新申請的內存空間
InputData(pt);//輸入數據,存放到pt所指向的結構數據。注意讓pt的next指向NULL
if (strcmp(pt->no,"@")==0)
{
free(pt);//釋放pt所指向的內存空間
break;//退出循環
}
else if (head==NULL)
{
pth=pt;
head=pt;//將頭指針head和pth指向pt
}
else
{

pth->next=pt; //將pth的next指向pt;
pth=pt; //將pth指向pt;
}
};
}

void print( ) //列印單鏈表中所有數據
{ int i=0;
STUDENT *p;//第一個指針p
p=head;//將p指向head

printf("\n");
printf("******************************STUDENT******************************\n");
printf("|rec|no | name | sc1| sc2| sc3| sum | ave |order|\n");
printf("|---|----------|----------------|----|----|----|------|-----|-----|\n");

//列印表頭
while (p!=NULL)
{
printf("|%3d|%10s|%-16s|%4.1f|%4.1f|%4.1f|%6.2f|%5.1f|%5d|\n",
++i,p->no,p->name,p->score[0],p->score[1],p->score[2],
p->sum,p->average,p->order); //列印p所指向的結構中的所有數據。注意列印數據間的分隔線
p=p->next;//將p指向p的下一個結構數據
}
printf("********************************END********************************\n");//列印表尾
}

void Delete( ) //刪除一個記錄
{
STUDENT *p,*pth;//定義兩個指針p,pth
char no[11];//定義一個整數no(用來存儲輸入的學號)
printf("intput delete no\n");
scanf("%s",no);//用輸入語句輸入一個學號存儲到no中
p=head;pth=head;//將p和pth都指向頭指針
if (strcmp(p->no,no)==0) //也就是若頭指針指向的數據需要刪除
{
head=head->next;//將head指針指向head的下一個數據;
free(p);//釋放p所指向的數據
}
else
{
p=p->next;//將p指向p的下一個數據
while ( p!=NULL)
{
if (strcmp(p->no,no)==0) //找到了要刪除的數據
{
pth->next=p->next;//將pth的next指向p的next
free(p);//釋放p
break;//退出循環
}
else
{
pth=pth->next;//將pth指向pth的next 或 將pth指向p
p=p->next;//將p指向p的next
}
}
}
}

void append()
{
STUDENT *p,*pth;//定義兩個指針變數p,pth

pth=head;//將pth指向head
while ( pth->next!=NULL)
{
pth=pth->next;//ptr指向ptr的next
}

p=(STUDENT *)malloc(sizeof(STUDENT));//將p指向新申請的內存空間
InputData(p);p->next=NULL;//數據數據存儲到p所指向的內存空間,注意將p的next置為NULL
pth->next=p;//將ptr的next指向p
}
void InputData( STUDENT *ptr )
{ int i;
printf("enter no:");
scanf("%s",ptr->no);
if (strcmp(ptr->no,"@")==0 ) return;

printf("enter name:");
scanf("%s",ptr->name);

for(i=0;i<3;i++)
{
printf("shuru chengji\n");
scanf("%f",&ptr->score[i]);
}

ptr->sum=0;
ptr->average=0;
ptr->order=0;
ptr->next=NULL;
}
void computer()
{
STUDENT *p;
p=head;
for(;p;p=p->next)
{
p->sum=p->score[0]+p->score[1]+p->score[2];
p->average=(p->score[0]+p->score[1]+p->score[2])/3;
}
}

⑼ 計算機專業的基於C語言的圖書管理系統的設計與實現 論文開題報告

這個圖書管理系統有詳細要求嗎?

可以發給我看看 我做