導航:首頁 > 電腦系統 > 學生管理系統的電腦版

學生管理系統的電腦版

發布時間:2022-07-01 23:57:08

Ⅰ 有什麼好用的學生管理系統軟體適合學校用的

有什麼好用的學生管理系統軟體適合學校用。我覺得學校用的軟體現在學校都正在用呢,你可以到學校去問一問,每個學校都有,不用上這上面問。

Ⅱ 設計一個學生信息管理系統

#include #include #include #define MAX 1000 /*定義學生成績信息結構*/ struct stu { char id[8]; char name[8]; double Chinese; double Math; double English; double average; double total; }; /*學生結構數組,用於存儲學生成績信息*/ struct stu students[MAX]; /*當前學生人數*/ int current; void input() { int i; printf("請輸入學生人數:"); scanf("%d", & current); for (i = 0; i < current; i++) { printf("\n請輸入學生學號,最多為7位數: "); scanf("%s", students[i].id); printf("請輸入學生姓名:"); scanf("%s", students[i].name); printf("請輸入語文成績:"); scanf("%lf", &students[i].Chinese); printf("請輸入數學成績:"); scanf("%lf", &students[i].Math); printf("請輸入英語成績:"); scanf("%lf", &students[i].English); students[i].total = students[i].Chinese + students[i].Math + students[i].English; students[i].average = students[i].total / 3; } } /*排名次,即對學生結構數組排序*/ void sort(struct stu array[], int n) { int i, j; struct stu temp; for (i = 0; i < n; i++) { for (j = i+1; j < n; j++) { if (array[i].average - array[j].average < 1e-16) { temp = array[i]; array[i] = array[j]; array[j] = temp; } } } } /*統計平均成績,並輸出各分數段的人數*/ void print_score(struct stu array[], int n) { int i; double ave = 0; int sum1 = 0, sum2 = 0, sum3 = 0, sum4 = 0; for (i = 0; i < n; i++) { ave += array[i].average; switch ((int)(array[i].average / 10)) { case 10: case 9: sum1++; break; case 8: sum2++; break; case 7: case 6: sum3++; break; default: sum4++; } } printf("全班的平均分為:%.1f\n", ave/n); printf("平均分在90分以上的人數為:%d\n", sum1); printf("平均分在80~89的人數為:%d\n", sum2); printf("平均分在60~79的人數為:%d\n", sum3); printf("平均分在60分以下的人數為:%d\n", sum4); } /*輸出不及格科目及學生名單*/ void print_unreach(struct stu array[], int n) { int i; printf("科目\t學號\t名字\n"); for (i = 0; i < n; i++) { if (array[i].Chinese < 60) { printf("語文\t%s\t%s\n", array[i].id, array[i].name); } if (array[i].Math < 60) { printf("數學\t%s\t%s\n", array[i].id, array[i].name); } if (array[i].English 60) { printf("英語\t%s\t%s\n", array[i].id, array[i].name); } } } /*列印優等生名單*/ void print_good(struct stu array[], int n) { int i; char mark = 0; if (n > 3) { n = 3; } printf("學號\t姓名\t語文\t數學\t英語\t平均分\t名次\n"); for (i = 0; i n; i++) { if ((array[i].Chinese > 60) && (array[i].Math > 60) && (array[i].English > 60)) { if (array[i].average > 90) mark = 1; else if (array[i].average > 85) { if (array[i].Chinese == 100) mark = 1; if (array[i].Math == 100) mark = 1; if (array[i].English == 100) mark = 1; if (array[i].Chinese > 95 && array[i].English > 95) mark = 1; if (array[i].Chinese > 95 && array[i].Math > 95) mark = 1; if (array[i].Math > 95 && array[i].English > 95) mark = 1; } if (mark == 1) { printf("%s\t%s\t", array[i].id, array[i].name); printf("%.f\t%.f\t%.f\t%.1f\t", array[i].Chinese, array[i].Math, array[i].English, array[i].average); printf("%d\n", i+1); } } } } /*按學生姓名查詢成績*/ void search_name(struct stu array[], int n, char* name) { int i; char mark = 1; for (i = 0; i < n; i++) { if (strcmp(name, array[i].name) == 0) { printf("學生姓名:%s\n", name); printf("學生學號:%s\n", array[i].id); printf("語文:%.f\n", array[i].Chinese); printf("數學:%.f\n", array[i].Math); printf("英語:%.f\n", array[i].English); printf("平均分:%.1f\n", array[i].average); mark = 0; } } if (mark == 1) puts("不存在該學生記錄"); } /*按學生學號查詢成績*/ void search_id(struct stu array[], int n, char* id) { int i; char mark = 1; for (i = 0; i < n; i++) { if (strcmp(id, array[i].id) == 0) { printf("學生姓名:%s\n", array[i].name); printf("學生學號:%s\n", array[i].id); printf("語文:%.f\n", array[i].Chinese); printf("數學:%.f\n", array[i].Math); printf("英語:%.f\n", array[i].English); printf("平均分:%.1f\n", array[i].average); mark = 0; break; } } if (mark == 1) puts("不存在該學生記錄"); } void print_menu() { system("cls"); printf("1.輸入學生信息\n"); puts("2.統計全班學生成績"); puts("3.按學號查詢學生成績"); puts("4.按姓名查詢學生成績"); puts("5.輸出不及格情況"); puts("6.輸出優等生名單"); puts("0.退出本程序"); printf("\n\n 請輸入你的選擇:"); } int main(int argc, char **argv) { char ch = 0; char id[8], name[8]; while (ch != '0') { print_menu(); ch = getchar(); switch (ch) { case '1': { system("cls"); input(); sort(students, current); break; } case '2': { system("cls"); print_score(students, current); break; } case '3': { system("cls"); printf("請輸入學號:"); scanf("%s", id); search_id(students, current, id); break; } case '4': { system("cls"); printf("請輸入姓名:"); scanf("%s", name); search_name(students, current, name); break; } case '5': { system("cls"); print_unreach(students, current); break; } case '6': { system("cls"); print_good(students, current); break; } case '0': exit(0); } printf("\n\n按任意鍵返回主菜單……"); getchar(); getchar(); } return 0; }

Ⅲ C語言學生管理系統

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

#define max 20

typedef struct student //學生
{
char sno[max]; // 學號
char sname[max]; //姓名
char sex[max]; //性別
char age[max]; //年齡
char depart[max]; //系
char classs[max]; //班
char grade[max]; //年級

struct student* next;
} student;

student* head;

int LogOn() //登錄模塊,已實現輸入密碼不回顯,如果中途發現輸錯某幾位,可退格鍵重輸
{
char username[max],password[max];
printf("\n請輸入用戶名:");
scanf("%s",username);
printf("\n請輸入密碼(最多15位):");

//開始以不回顯且支持退格方式獲取輸入密碼
int i=0;
while((i>=0)&&(password[i++]=getch())!=13)//條件i>=0是用於限制退格的范圍
{
if(password[i-1]=='\b')//對退格鍵的處理
{
printf("%c%c%c",'\b','\0','\b');
i=i-2;
}
else
printf("*");
}
password[--i]='\0';

//已獲取密碼。驗證用戶身份
if(!strcmp(username,"zhang")&&!strcmp(password,"8147086"))
{
printf("\n登錄成功!");
return 1;
}
else
return 0;

}

void regist()
{
char ch;
student *s,*ptr; //s用來建新結點,ptr用來暫存頭結點

do
{

s=(student*)malloc(sizeof(student)); // 新建一個學生結點

printf("\n開始注冊..."); //開始注冊
printf("\n請輸入該學生的學號:");
scanf("%s",s->sno);
printf("\n請輸入該學生的姓名:");
scanf("%s",s->sname);
printf("\n請輸入該學生的性別:");
scanf("%s",s->sex);
printf("\n請輸入該學生的年齡:");
scanf("%s",s->age);
printf("\n請輸入該學生的系:");
scanf("%s",s->depart);
printf("\n請輸入該學生所在的班:");
scanf("%s",s->classs);
printf("\n請輸入該學生所在的年級");
scanf("%s",s->grade);

ptr=head;
head=s;//將新結點插入隊頭
s->next=ptr;

fflush(stdin);
printf("\n請問是否繼續注冊?(Y/N)");
scanf("%c",&ch);
}while(ch=='Y'||ch=='y');

return;
}

void ElePrint(char str[]) //輸出單個元素
{
if(str==NULL) exit(0);
printf("%s",str);
for(unsigned int i=0;i<12-strlen(str);i++) printf(" ");//為了對齊輸出,需插入一些空格
return;
}

int LinePrint(student *ptr) //輸出一行
{
if(ptr==NULL) //檢查傳進來的指針
return 0;

printf("\n");
ElePrint(ptr->sno);
ElePrint(ptr->sname);
ElePrint(ptr->age);
ElePrint(ptr->sex);
ElePrint(ptr->depart);
ElePrint(ptr->classs);
ElePrint(ptr->grade);

return 1;
}

void print() //輸出全部學生信息
{
student *ptr=head;
printf("\n學號 姓名 年齡 性別 系 班 年級 ");
while(ptr)
{
LinePrint(ptr);
ptr=ptr->next;
}
printf("\n");
return;
}
void search()//查詢模塊
{
int method;//查詢方式
char no[max],name[max],departm[max],clss[max],grades[max]; //用來接收查詢關鍵字
while(1)
{
printf("\n請選擇查詢方式");
printf("\n1.按學號查詢");
printf("\n2.按姓名查詢");
printf("\n3.按所在系查詢");
printf("\n4.按所在班級查詢");
printf("\n5.按所在年級查詢");
printf("\n6.列印全部學生信息");
printf("\n7.返回主菜單\n");

scanf("%d",&method);

student *p=head,*temp;

switch(method)
{
case 1:
printf("\n請輸入要查詢的學號:");
scanf("%s",no);
while(p)
{
if(!strcmp(p->sno,no))
break;
else
{
temp=p;
p=p->next;
}
}
printf("\n學號 姓名 年齡 性別 系 班 年級 ");
LinePrint(p);
break;
case 2:
printf("\n請輸入要查詢的姓名:");
scanf("%s",name);
printf("\n學號 姓名 年齡 性別 系 班 年級 ");
while(p)
{
if(!strcmp(p->sname,name))
LinePrint(p);
p=p->next;
}
break;
case 3:
printf("\n請輸入學生所在的系:");
scanf("%s",departm);
printf("\n學號 姓名 年齡 性別 系 班 年級 ");
while(p)
{
if(!strcmp(p->depart,departm))
LinePrint(p);
p=p->next;
}
break;
case 4:
printf("\n請輸入學生所在的班:");
scanf("%s",clss);
printf("\n請輸入學生所在的年級:");
scanf("%s",grades);
printf("\n學號 姓名 年齡 性別 系 班 年級 ");
while(p)
{
if(!strcmp(p->classs,clss)&&!strcmp(p->grade,grades))
LinePrint(p);
p=p->next;
}
break;

case 5:
printf("\n請輸入學生所在的年級:");
scanf("%s",grades);
printf("\n學號 姓名 年齡 性別 系 班 年級 ");
while(p)
{
if(!strcmp(p->grade,grades))
LinePrint(p);
p=p->next;
}
break;

case 6:
print();
break;

case 7:
return;
default:
printf("很抱歉,暫無此查詢方式!");
break;
}
}

}

void modify()//修改學生信息
{
char num[max];
student *p=head;
printf("\n請輸入要修改的學生的學號:");
scanf("%s",num);
while(p)
{
if(!strcmp(p->sno,num))
break;
else
p=p->next;
}
if(p==NULL)
{
printf("\n錯誤:沒有此學生的信息!\n");
return;

}
LinePrint(p);

printf("\n請輸入要修改的該學生的信息:");
printf("\n1.姓名");
printf("\n2.性別");
printf("\n3.年齡");
printf("\n4.所在的系");
printf("\n5.所在的班");
printf("\n6.所在的年級");

char name1[max],sex1[max],age1[max],depart1[max],class1[max],grade1[max];
int select;
fflush(stdin);
scanf("%d",&select);
printf("\n請輸入新的信息:");

switch(select)
{
case 1:
scanf("%s",name1);
strcpy(p->sname,name1);
break;
case 2:
scanf("%s",sex1);
strcpy(p->sex,sex1);
break;
case 3:
scanf("%s",age1);
strcpy(p->age,age1);
break;
case 4:
scanf("%s",depart1);
strcpy(p->depart,depart1);
break;
case 5:
scanf("%s",class1);
strcpy(p->classs,class1);
break;
case 6:
scanf("%s",grade1);
strcpy(p->grade,grade1);
break;
default:
printf("\nError!");
break;
}

LinePrint(p);
return;
}

void del()// 刪除某學生的信息
{
student *p=head,*temp=head,*s;
char num1[max];
printf("\n請輸入要刪除的學生的學號:");
scanf("%s",num1);
while(p)//查找該學生所在的結點
{
if(!strcmp(p->sno,num1))
break;
else
{
temp=p;
p=p->next;
}

}//while
if(!p)
{
printf("\n不存在此學生的信息.");
return;
}
LinePrint(p);//輸出該學生的信息
printf("\n請問真的要刪除該學生的信息嗎?(Y/N)");
char ch;
fflush(stdin);
scanf("%c",&ch);
if(ch=='Y'||ch=='y')
{
s=p->next;
temp->next=s;
free(p);
printf("\n已經刪除該學生的信息.");
}
return;
}

void sort() //排序模塊。將學生記錄按學號從小到大排列。用起泡排序演算法實現
{

student *ptr,*s=head,*p;
int count=0,count1;
while(s)//統計鏈表結點個數
{
count++;
s=s->next;
}

for(int i=1;i<count;i++)
{
ptr=head;
p=NULL;
count1=count-i; //用來控制每輪起泡排序的終點,即每次把學號最小的結點移到倒數第i個結點
while(ptr&&ptr->next&&(count1--))
{
if(strcmp(ptr->sno,ptr->next->sno)>0)
{
s=ptr->next;
ptr->next=s->next;
if(p==NULL) //ptr處於隊頭時
head=s;
else
p->next=s;
s->next=ptr;
p=s;
}
else
{
ptr=ptr->next;
if(p==NULL) //ptr處於隊頭時
p=head;
else
p=p->next;
}
}
}
return;
}

void quit()
{
char ch;
printf("\n真的要退出?(Y/N)");
fflush(stdin);
scanf("%c",&ch);
if(ch=='Y'||ch=='y')
exit(0);
return;
}

int main()
{
int option;

printf("\[email protected] KongXinCai All rights reserved.");
printf("\n歡迎使用學生信息管理系統!\n");

//登錄模塊
int icheck=0;
while(icheck<3)
{
if(LogOn()==0)
icheck++;
else
break;

}
if(icheck==3)
{
printf("\n連續登錄三次不成功,退出!");
exit(0);
}

//系統界面

while(1)
{
printf("\n\n請選擇需要的服務:");
printf("\n1.注冊");
printf("\n2.查詢");
printf("\n3.修改");
printf("\n4.刪除");
printf("\n5.排序");
printf("\n7.求平均");
printf("\n6.退出\n");

scanf("%d",&option);

switch(option)
{
case 1:
regist();
break;
case 2:
search();
break;
case 3:
modify();
break;
case 4:
del();
break;
case 5:
sort();
break;
case 6:
quit();
break;
}

}

return 0;

}

Ⅳ 學生管理系統

#include<iostream>
#include<cstring>
#include<fstream>
using namespace std;

int num=0;
const int MAX_NUM_OF_STUDENTS=1000;

struct Student
{
char name[20],sex[10],bonetime[20],address[20],mail[20];
int no,age,phone;

};
Student students[MAX_NUM_OF_STUDENTS];
Student name_students[MAX_NUM_OF_STUDENTS];

char choose;
extern int Input_project();
extern int Search_project();
extern int Delete_project();
extern int Modify_project();

int Face()//主界面
{
cout<<"***********歡迎使用學生信息管理系統************"<<endl<<endl;
cout<<"◇ 錄入(I),"<<endl<<"◇ 查詢(S),"<<endl<<"◇ 刪除(D),"<<endl
<<"◇ 修改(M),"<<endl<<"◇ 退出(E),"<<endl;
cout<<"☆ 請輸入您的選擇(I,S,D,E):";

cin>>choose;

switch(choose)
{ case 'I':
case 'i': system("cls");Input_project();break;
case 'S':
case 's': system("cls");Search_project();break;
case 'D':
case 'd': system("cls");Delete_project();break;
case 'M':
case 'm': system("cls");Modify_project();break;
case 'E':
case 'e': system("cls");return -1;break;
default: cout<<" 輸入錯誤!"<<endl;
}
return 0;
}
int Input_project()//輸入功能
{
choose='C';
while( choose=='C'||choose=='c')
{
num++;
cout<<"請輸入學號:";
cin>>students[num].no;
cout<<"請輸入姓名:";
cin>>students[num].name;
cout<<"請輸入年齡:";
cin>>students[num].age;
cout<<"請輸入性別:";
cin>>students[num].sex;
cout<<"請輸入出生年月:";
cin>>students[num].bonetime;
cout<<"請輸入地址:";
cin>>students[num].address;
cout<<"請輸入電話號碼:";
cin>>students[num].phone;
cout<<"請輸入E-mail:";
cin>>students[num].mail;
cout<<"☆ 繼續或返回主菜單(C/E):";

cin>>choose;

if(choose=='E'||choose=='e') break;
}

num+=1;
int i=num;//以下是按no冒泡排序
bool exchange;
while(i>1)
{ exchange=false;
for( int k=0;k<i-1;k++)
{ if(students[k].no>students[k+1].no)
{ Student temp=students[k];
students[k]=students[k+1];
students[k+1]=temp;
exchange=true;
}
}
if (!exchange) break;
i--;
}

for (int t=0;t<num;t++)//結構體數組各項一一復制
{ name_students[t].no=students[t].no;
*strcpy(name_students[t].name,students[t].name);
name_students[t].age=students[t].age;
*strcpy(name_students[t].sex,students[t].sex);
*strcpy(name_students[t].bonetime,students[t].bonetime);
*strcpy(name_students[t].address,students[t].address);
name_students[t].phone=students[t].phone;
*strcpy(name_students[t].mail,students[t].mail);
}

while(i>1)//以下是按name冒泡排序
{ exchange=false;
for( int k=0;k<i-1;k++)
{ if(strcmp(name_students[k].name,name_students[k+1].name)>0)
{ Student temp=name_students[k];
name_students[k]=name_students[k+1];
name_students[k+1]=temp;
exchange=true;
}
}
if (!exchange) break;
i--;
}

FILE *fp=fopen("c:\\name.txt","a+");//存儲兩結構體數組
FILE *fp1=fopen("c:\\number.txt","a+");

if (fp == NULL||fp1 == NULL)//判斷文件打開是否成功
{
cout<<"打開文件失敗!"<<endl;
return -1;
}
for(i=0;i<num;i++)
{
fwrite(&students[i],sizeof(Student),1,fp);
fwrite(&name_students[i],sizeof(Student),1,fp1);
}
fclose(fp);
fclose(fp1);
system("cls");return 0;
}
int Search_project()//查詢功能
{
FILE *fp=fopen("c:\\name.txt","r");
FILE *fp1=fopen("c:\\number.txt","r");
if (fp == NULL||fp1 == NULL)//判斷文件打開是否成功
{
cout<<"打開文件失敗!"<<endl;
return -1;
}
num=0;

fread(&students[num],sizeof(Student),1,fp);
fread(&name_students[num],sizeof(Student),1,fp1);
while((!feof(fp))&&(!feof(fp1)))
{
num++;//計算已存儲的資料的人數num
fread(&students[num],sizeof(Student),1,fp);
fread(&name_students[num],sizeof(Student),1,fp1);
}
fclose(fp);
fclose(fp1);

cout<<'\t'<<"按學號查詢(A)"<<'\t'<<"按姓名查詢(B)"<<'\t'<<"返回主菜單(E)"<<endl;
cout<<"Ο 請選擇:";
char input;
cin>>input;

switch(input)
{
case 'A':
case 'a':
{
cout<<"請輸入學號:";
int number;
cin>>number;//以下是折半查詢:
int low=0;
int high=num-1;
while (low<=high)
{
int mid=(low+high)/2;
if (students[mid].no==number)
{
cout<<" 學號:"<<students[mid].no<<endl;
cout<<" 姓名:"<<students[mid].name<<endl;
cout<<" 年齡: "<<students[mid].age<<endl;
cout<<" 性別: "<<students[mid].sex<<endl;
cout<<"出生年月: "<<students[mid].bonetime<<endl;
cout<<" 地址: "<<students[mid].address<<endl;
cout<<"電話號碼: "<<students[mid].phone<<endl;
cout<<" E-mail: "<<students[mid].mail<<endl;

break;
}
else if (number>students[mid].no)
low=mid+1;
else high=mid-1;
}
if(low>high) cout<<" 無相關資料!"<<endl;
}
break;

case 'B':
case 'b':
{
cout<<"請輸入姓名:";
char name[20];
cin>>name;
int low=0;
int high=num-1;//以下是折半查詢:
while (low<=high)
{
int mid=(low+high)/2;
if (strcmp(name_students[mid].name,name)==0)
{
cout<<" 學號:"<<name_students[mid].no<<endl;
cout<<" 姓名:"<<name_students[mid].name<<endl;
cout<<" 年齡: "<<name_students[mid].age<<endl;
cout<<" 性別: "<<name_students[mid].sex<<endl;
cout<<" 出生年月: "<<name_students[mid].bonetime<<endl;
cout<<" 地址: "<<name_students[mid].address<<endl;
cout<<" 電話號碼: "<<name_students[mid].phone<<endl;

cout<<" E-mail: "<<name_students[mid].mail<<endl;
break;
}
else if (strcmp(name_students[mid].name,name)<0)
low=mid+1;
else high=mid-1;
}
if(low>high) cout<<" 無相關資料!"<<endl;
}
break;
case 'E':
case 'e':
system("cls");
return -1;break;
}

cout<<"☆ 繼續或返回主菜單(C/E):";

cin>>choose;
if(choose=='C'||choose=='c')
{
system("cls");
Search_project();
}
else
{
system("cls");
return -1;
}
return 0;
};

int Delete_project()
{
cout<<'\t'<<"按學號刪除(A)"<<'\t'<<"按姓名刪除(B)"<<'\t'<<"返回主菜單(E)"<<endl;
cout<<" 請選擇:";
char input;
cin>>input;

switch(input)
{
case 'A':
case 'a':
cout<<" 需刪除的學生的學號是:";
int number;
cin>>number;
for(int i=0;i<num;i++)
{
if( students[i].no==number)
break;
}
for(int j=i;j<num;j++)//將要刪除的學生調至數組最後一位,前num-1位仍按no排列
{
Student temp =students[j];
students[j]=students[j+1];
students[j+1]=temp;
}
case 'B':
case 'b':
cout<<" 需刪除的學生的姓名是:";
char name[20];
cin>>name;
for(int t=0;t<num;t++)
{
if(strcmp(name_students[t].name,name)==0)
break;
}
for(int j=t;j<num;j++)//將要刪除的學生調至數組最後一位,前num-1位仍按name排列
{
Student temp =name_students[j];
name_students[j]=name_students[j+1];
name_students[j+1]=temp;
}
num-=1;//總人數減一,即刪除最後一位

FILE *fp=fopen("c:\\name.txt","w");
FILE *fp1=fopen("c:\\number.txt","w");
if (fp == NULL||fp1 == NULL)//判斷文件打開是否成功
{
cout<<"打開文件失敗!"<<endl;
return -1;
}
for(i=0;i<num;i++)
{
fwrite(&students[i],sizeof(Student),1,fp);
fwrite(&name_students[i],sizeof(Student),1,fp1);
}
fclose(fp);
fclose(fp1);

bool p=true;//以下查找並判斷刪除是否成功
int low=0;
int high=num-1;
while (low<=high)
{
int mid=(low+high)/2;
if (students[mid].no==number||name_students[mid].no==number)
{
cout<<" 刪除失敗!"<<endl;
p=false;
break;
}
else if (number>students[mid].no)
low=mid+1;
else high=mid-1;
}
if(p)
cout<<" 刪除成功!"<<endl;
cout<<"☆ 繼續或返回主菜單(C/E):";

cin>>choose;
if(choose=='C'||choose=='c')
{
system("cls");Delete_project();
}
else
{
system("cls");return -1;
}
return 0;
};

int Modify_project()
{
FILE *fp=fopen("c:\\name.txt","r");
FILE *fp1=fopen("c:\\number.txt","r");
if (fp == NULL||fp1 == NULL)//判斷文件打開是否成功
{
cout<<"打開文件失敗!"<<endl;
return -1;
}
num=0;
fread(&students[num],sizeof(Student),1,fp);
fread(&name_students[num],sizeof(Student),1,fp1);
while((!feof(fp))&&(!feof(fp1)))
{
num++;//計算已存儲的資料的人數num
fread(&students[num],sizeof(Student),1,fp);
fread(&name_students[num],sizeof(Student),1,fp1);
}
fclose(fp);
fclose(fp1);

cout<<" 需修改的學生的學號是:";
int number;
cin>>number;
int t,math,english,physics,computer;
cout<<" 輸入修改結果:"<<endl;
cout<<" 姓名:";
cin>>name;
cout<<" 年齡:";
cin>>age;
cout<<" 性別:";
cin>>sex;
cout<<" 出生年月:";
cin>>bonetime;
cout<<" 地址:";
cin>>address;
cout<<" 電話號碼:";
cin>>phone;
cout<<" E-mail:";
cin>>mail;
for(int i=0;i<num;i++)
{
if( students[i].no==number)
break;
}
students[i].name=name;
students[i].age=age;
students[i].sex=sex;
students[i].bonetime=bonetime;
students[i].address=address;
students[i].phone=phone;
students[i].mail=mail;

i=num;//以下是按no冒泡排序
bool exchange;
while(i>1)
{
exchange=false;
for( int k=0;k<i-1;k++)
{
if(students[k].no>students[k+1].no)
{
Student temp=students[k];
students[k]=students[k+1];
students[k+1]=temp;
exchange=true;
}
}
if (!exchange) break;
i--;
}

for (t=0;t<num;t++)//結構體數組各項一一復制
{
name_students[t].no=students[t].no;
*strcpy(name_students[t].name,students[t].name);
name_students[t].age=students[t].age;
name_students[t].sex=students[t].sex;
name_students[t].bonetime=students[t].bonetime;
name_students[t].address=students[t].address;
name_students[t].phone=students[t].phone;
name_students[t].mail=students[t].mail;
}
while(i>1)//以下是按name冒泡排序
{
exchange=false;
for( int k=0;k<i-1;k++)
{
if(strcmp(name_students[k].name,name_students[k+1].name)>0)
{
Student temp=name_students[k];
name_students[k]=name_students[k+1];
name_students[k+1]=temp;
exchange=true;
}
}
if (!exchange) break;
i--;
}

fp=fopen("c:\\name.txt","w+");//存儲兩結構體數組,w+表示清空已有文件的內容
fp1=fopen("c:\\number.txt","w+");
if (fp == NULL||fp1 == NULL)//判斷文件打開是否成功
{
cout<<"打開文件失敗!"<<endl;
return -1;
}
for(i=0;i<num;i++)
{
fwrite(&students[i],sizeof(Student),1,fp);
fwrite(&name_students[i],sizeof(Student),1,fp1);
}
fclose(fp);
fclose(fp1);
cout<<"☆ 繼續或返回主菜單(C/E):";

cin>>choose;
if(choose=='C'||choose=='c')
{
system("cls");Delete_project();}
else {system("cls");return -1;}
return 0;
};

int main()
{
system("cls");
do
{Face();}
while (choose=='e'||choose=='E');
return 0;
system("pause");
}

Ⅳ 學生管理系統程序

這個不難 自己做 再說你也沒說用什麼語言,資料庫開發 CS /BS

Ⅵ 學生信息管理系統(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語言的課程設計吧,現在的教學還真是極端類似,當時學c我的課程設計也是這種,題目文字表述幾乎不變,不過同學如果你是認真想學到c的話,你還是自己認真投入去編寫吧,
這個題目要編寫系統這幾乎是包含C語言最簡單也是最基礎的幾條命令,如果學了c,連最基礎的都寫不出來。那也就白學了

下面是一個當時沒完成的半成品,剛好電腦里還保存這個文件,我不是專業學C的,下面的程序僅供你參考

#define N 2 //N為輸入的學生數量
#include<stdio.h>

struct student
{
int num[10];
char sex[2];
char name[15];
char cla[12];
int score[3];
}stu[N+N+1];

void input(struct student stu[])
{
int i,j;
for(i=0;i<N;i++)
{
printf("\n請輸入第%d個同學的信息:\n",i+1);
printf("\n學號:");
scanf("%d",stu[i].num);
printf("\n性別,男(女)性用b(g)表示:");
scanf("%s",stu[i].sex);
printf("\n姓名:");
scanf("%s",stu[i].name);
printf("\n班級:");
scanf("%s",stu[i].cla);
for(j=0;j<3;j++)
{
printf("\nscore %d:",j+1);
scanf("%d",&stu[i].score[j]);
}
printf("\n該學生輸入完成!\n");
}
printf("\n 全部輸入結束!\n");
}

void main()
{
void pp();
void input();
void xg();
void print();
void cl();
pp();
printf("\n");
printf("\n 操作完成,關閉窗口退出!\n\n");
}

void print(struct student stu[])
{
int i,j;
printf("\n學號 姓名 性別 班級 score1 score2 score3\n");
for(i=0;i<N;i++)
{
printf("%-15d%-15s%-10s%-10s",*stu[i].num,stu[i].name,stu[i].sex,stu[i].cla);
for(j=0;j<3;j++)
printf("%-9d",stu[i].score[j]);
printf("\n");
}
}

void pp()
{
int s ;
printf(" ★小型學生信息管理系統★\n");
do
{
printf("\n 主菜單\n");
printf("\n 1.數據輸入 2.數據修改 3.數據處理 4.數據輸出 5.退出\n");
printf("\n請輸入您要執行的命令,用命令前的數字表示:");
scanf("%d",&s);
switch(s)
{
case 1 : input(stu);break;
case 2 : xg(stu);break;
case 3 : cl();break;
case 4 : print(stu);break;
}
}
while(s!=5);
}

void xg(struct student stu[])
{
int n,i,j,e;char f;
printf("\n請輸入要修改的學生學號:");
scanf("%d",&n);getchar();
for(i=0;i<N;i++)
/*if(n!=*stu[i].num)
{
if(i==N-1)
printf("\n查無此學號!\n");
}
else*/

{
printf("\n修改過後原有數據將消失,確定?(y/n)");
scanf("%c",&f);
if(f=='y')
{
for(i=0;i<N;i++)
{
if(n==*stu[i].num)
{
do
{
printf("\n 【數據修改】\n");
printf("\n1.學號 2.姓名 3.性別 4.班級 5.成績 6.退出修改\n");
printf("\n重新選擇輸入該學生數據,用命令前的數字表示:");
scanf("%d",&e);
switch(e)
{
case 1 : printf("\n學號:");scanf("%d",stu[i].num);break;
case 2 : printf("\n姓名:");scanf("%s",stu[i].name);break;
case 3 : printf("\n性別,男(女)性用b(g)表示:");scanf("%s",stu[i].sex);break;
case 4 : printf("\n班級:");scanf("%s",stu[i].cla);break;
case 5 : for(j=0;j<3;j++)
{
printf("\nscore %d:",j+1);
scanf("%d",&stu[i].score[j]);
}break;
}
}
while(e!=6);
printf(" \n修改完成!\n");
}
}
}
printf("\n修改結束!\n");
}
}

void cl(struct sudent stu[])
{
void px();
void cx();
void tj();
int q;
do
{
printf("\n 【數據處理】\n");
printf("\n 1.排序 2.查詢 3.統計 4.返回上層\n");
printf("\n請輸入您要執行的命令,用命令前的數字表示:");
scanf("%d",&q);
switch(q)
{
case 1 : px(stu);break;
case 2 : cx(stu);break;
case 3 : tj(stu);break;
}
}
while(q!=4);
}

void px()
{
int l,k,i,j;
for(l=0;l<N;l++)
stu[N+l]=stu[l];
for(l=0;l<N-1;l++)
for(k=0;k<N-l-1;k++)
if(*stu[k+N].num>*stu[N+k+1].num)
{
stu[N+N]=stu[N+k];stu[N+k]=stu[N+1+k];stu[N+1+k]=stu[N+N];
}
printf("\n學號 姓名 性別 班級 score1 score2 score3\n");
for(i=N;i<N+N;i++)
{
printf("%-15d%-15s%-10s%-10s",*stu[i].num,stu[i].name,stu[i].sex,stu[i].cla);
for(j=0;j<3;j++)
printf("%-9d",stu[i].score[j]);
printf("\n");
}
printf("\n 排序完成!\n");
}

void cx()
{
int n,i,j;
printf("\n請輸入您要查詢的學生學號:");
scanf("%d",&n);
for(i=0;i<N;i++)
if(n!=*stu[i].num)
{
if(i==N-1)
printf("\n查無此學號!");
}
else
{
printf("\n學號 姓名 性別 班級 score1 score2 score3\n");
printf("%-15d%-15s%-10s%-10s",*stu[i].num,stu[i].name,stu[i].sex,stu[i].cla);
for(j=0;j<3;j++)
printf("%-9d",stu[i].score[j]);
printf("\n");
}
}

void tj()
{
void pjf();
void loss();
int t;
do
{
printf("\n 【統計】\n");
printf("\n1.輸出各學生的平均分 2.存在不及格科目的學生 3.返回上層\n");
printf("\n請輸入您要執行的命令,用命令前的數字表示:");
scanf("%d",&t);
switch(t)
{
case 1 : pjf();break;
case 2 : loss();break;
}
}
while(t!=3);
}

void pjf()
{

}

void loss()
{

}

Ⅹ 學生管理系統的介紹

學生信息管理系統是針對學校學生處的大量業務處理工作而開發的管理軟體,主要用於學校學生信息管理,總體任務是實現學生信息關系的系統化、科學化、規范化和自動化,其主要任務是用計算機對學生各種信息進行日常管理,如查詢、修改、增加、刪除等,另外還考慮到學生選課,針對這些要求設計了學生信息管理系統。推行學校信息管理系統的應用是進一步推進學生學籍管理規范化、電子化、控制輟學和提高義務教育水平的重要舉措。

閱讀全文

與學生管理系統的電腦版相關的資料

熱點內容
平板電腦鍵盤功能介紹 瀏覽:427
現代戰爭5電腦配置 瀏覽:587
電腦轉圈圈卡住了是硬碟的問題嗎 瀏覽:635
捷克街頭免費視頻網站 瀏覽:594
台式電腦在哪裡安裝驅動光碟 瀏覽:64
蘋果手機黃色軟體 瀏覽:915
電腦重裝系統要不要把c盤格式化 瀏覽:907
蘋果手機本地閱讀軟體 瀏覽:863
檢測電腦溫度和頻率軟體 瀏覽:63
刷網站免費視頻 瀏覽:829
西瓜視頻要不要安裝電腦版 瀏覽:317
入侵別人手機的軟體 瀏覽:171
電腦主機沒有無線網卡怎麼連wifi 瀏覽:356
手機如何在win7電腦上放音樂 瀏覽:409
電腦黑屏充電有響聲 瀏覽:697
怎麼清理電腦c盤win7 瀏覽:4
打雷電腦黑屏能開機 瀏覽:395
清理電腦惡意軟體app 瀏覽:912
電腦為什麼經常斷網 瀏覽:683
做電商列印機怎麼連接到電腦 瀏覽:418