学生成绩管理系统
《学生成绩管理系统》本系统由三个模块组成:数据录入模块、查询模块和成绩通知单模块。1、数据录入:包括“初始建库”和“追加数据”两个子模块。2、查询:(1)按照学号查询,输...
《学生成绩管理系统》
本系统由三个模块组成:数据录入模块、查询模块和成绩通知单模块。
1、 数据录入 : 包括“初始建库”和“追加数据”两个子模块。
2、 查询:
(1)按照学号查询,输出查询结果。
(2)按照姓名查询,输出查询结果。
3、成绩通知单模块:根据选择的姓名或学号,按信件格式把寄给对应同学的信封的封面和成绩通知单输出到屏幕。
(1) 封面如下:
邮政编码
学生家庭地址
******同学 (收)
重庆科技学院信息学院
400050
(2) 通知单内容如下:
******同学:
您期末考试成绩如下:
数据结构: ×××分
C++ : ×××分
数学 : ×××分
英语 : ×××分
<1> 祝贺您取得了好成绩!
<2> 您的成绩不错,请继续努力!
<3> 请在以后的学习中吸取教训,争取好成绩!
注:根据以下情况选择输出<1>、<2>、<3>中的一句话。
1) 若该同学平均分大于或等于90分,则输出<1>
2) 若该同学平均分低于60分或有一门课程不及格,则输出<3>
3) 其它情况输出<2
学生结构体类型定义如下:
typedef struct _CStudent
{
char szName[20]; /* 学生姓名 */
int nNumber; /* 学号 */
int nAge; /* 年龄 */
char cSex; /* 性别,约定 ‘m’ 代表女,‘f’代表男 */
char szAddress[20]; /* 家庭地址 */
int nPostalcode; /* 家庭邮政编码 */
double dDataStruct; /* 数据结构成绩 */
double dMath; /* 数学成绩 */
double dEnglish; /* 英语成绩 */
double dCPlusPlus; /* C++成绩 */
}CStudent; 展开
本系统由三个模块组成:数据录入模块、查询模块和成绩通知单模块。
1、 数据录入 : 包括“初始建库”和“追加数据”两个子模块。
2、 查询:
(1)按照学号查询,输出查询结果。
(2)按照姓名查询,输出查询结果。
3、成绩通知单模块:根据选择的姓名或学号,按信件格式把寄给对应同学的信封的封面和成绩通知单输出到屏幕。
(1) 封面如下:
邮政编码
学生家庭地址
******同学 (收)
重庆科技学院信息学院
400050
(2) 通知单内容如下:
******同学:
您期末考试成绩如下:
数据结构: ×××分
C++ : ×××分
数学 : ×××分
英语 : ×××分
<1> 祝贺您取得了好成绩!
<2> 您的成绩不错,请继续努力!
<3> 请在以后的学习中吸取教训,争取好成绩!
注:根据以下情况选择输出<1>、<2>、<3>中的一句话。
1) 若该同学平均分大于或等于90分,则输出<1>
2) 若该同学平均分低于60分或有一门课程不及格,则输出<3>
3) 其它情况输出<2
学生结构体类型定义如下:
typedef struct _CStudent
{
char szName[20]; /* 学生姓名 */
int nNumber; /* 学号 */
int nAge; /* 年龄 */
char cSex; /* 性别,约定 ‘m’ 代表女,‘f’代表男 */
char szAddress[20]; /* 家庭地址 */
int nPostalcode; /* 家庭邮政编码 */
double dDataStruct; /* 数据结构成绩 */
double dMath; /* 数学成绩 */
double dEnglish; /* 英语成绩 */
double dCPlusPlus; /* C++成绩 */
}CStudent; 展开
展开全部
和你的差不多可以用来参考一下,别等别人了,还是自己动手吧~~
#include"stdio.h"
#include<string.h>
#include<stdlib.h>
#define N 30
struct student
{
int num;
char name[20];
int age;
int Math;
int English;
int Physical;
long int sum;
}stu[N];
enter()
{int i,n;
printf("How many students(1-%d)?:",N);
scanf("%d",&n);
printf("\nEnter data now\n\n");
for(i=0;i<n;i++)
{printf("\n Input %dth student record.\n",i+1);
input(i);
}
if(i!=0) save(n);
printf_back(); /* browse or back */
}
add()
{int i,n,m,k;
FILE *fp;
n=load();
printf("How many students are you want to add(1-%d)?:",N-n);
scanf("%d",&m);
k=m+n;
for(i=n;i<k;i++)
{printf("\n Input %dth student record.\n",i+1);
input(i);
}
if((fp=fopen("score.txt","ab"))==NULL)
{printf("Cannot open file.\n");
}
for(i=n;i<k;i++)
if(fwrite(&stu[i],sizeof(struct student),1,fp)!=1)
printf("file write error.\n");
fclose(fp);
printf_back();
}
/* insert()
{int n,c;
struct student s;
n=load();
puts("\n Input one data.\n");
do
{input(n);
printf_face();
printf_one(n);
printf("\n\nAre you sure?\n\n\t 1.Sure\t2.cancel and again\t3.Back without save [ ]\b\b");
scanf("%d",&c);
if(c==1)
{
save(n+1);
printf_back();
}
else if(c!=2) menu();
}
while(c==2);
} */
modify()
{struct student s;
FILE *fp;
int i,n,k,w0=1,w1,w2=0;
n=load();
do
{
k=-1;
printf_face();
for(i=0;i<n;i++)
{if((i!=0)&&(i%10==0))
{printf("\n\nRemember NO.031073- which needed modify.Pass any key to continue ...");
getch();
puts("\n\n");
}
printf_one(i);
printf("\n");
}
do
{printf("\n\nEnter NO.031073- that you want to modify! NO.:031073-");
scanf("%d",&s.num);
for(i=0;i<n;i++)
if(s.num==stu[i].num)
{k=i;
s=stu[i]; /* chengji beifei */
}
if(k==-1) printf("\n\nNO exist!please again");
}
while(k==-1);
printf_face();
printf_one(k);
w1=modify_data(k,n);
if(w1==1)
{printf("\nSuccessful ^_^.\n\nAre you modify another?\n\n\t1.Yes2.Back with save\t[ ]\b\b");
scanf("%d",&w0);
w2=1;
}
else
{w0=0; /* end */
if(w2==1)
stu[k]=s;
}
if(w0!=1&&w2==1) save(n); /* w0!=1 return w2==1 modify */
}
while(w0==1);
menu();
}
delete()
{struct student s;
FILE *fp;
int i,n,k,w0=1,w1,w2=0;
n=load();
do
{
k=-1;
printf_face();
for(i=0;i<n;i++)
{if((i!=0)&&(i%10==0))
{printf("\n\nRemember NO.031073- which needed delete.Pass any key to continue ...");
getch();
puts("\n\n");
}
printf_one(i);
printf("\n");
}
do
{printf("\n\nEnter NO.031073- that you want to delete! NO.:031073-");
scanf("%d",&s.num);
for(i=0;i<n;i++)
if(s.num==stu[i].num)
{k=i;
s=stu[i]; /* chengji beifei */
}
if(k==-1) printf("\n\nNO exist!please again");
}
while(k==-1);
printf_face();
printf_one(k);
printf("\nAre you sure?\n\n\t1.Sure2.Back without save in this time [ ]\b\b");
scanf("%d",&w1);
if(w1==1)
{
stu[k].sum=0;
printf("\nSuccessful ^_^.\n\nAre you delete another?\n\n\t1.Yes2.Back with save\t[ ]\b\b");
scanf("%d",&w0);
w2=1;
}
else
{w0=0; /* end */
if(w2==1)
stu[k]=s;
}
if(w0!=1&&w2==1) save(n);
}
while(w0==1);
menu();
}
modify_score()
{struct student s;
FILE *fp;
int i,n,k,w0=1,w1,w2=0;
n=load();
do
{
k=-1;
printf_face();
for(i=0;i<n;i++)
{if((i!=0)&&(i%10==0))
{printf("\n\nRemember NO.031073 which score needed modify.Pass any key to continue ...");
getch();
puts("\n\n");
}
printf_one(i);
printf("\n");
}
do
{printf("\n\nEnter NO.031073- that you want to modify! NO.:031073-");
scanf("%d",&s.num);
for(i=0;i<n;i++)
if(s.num==stu[i].num)
{k=i;
s=stu[i]; /* chengji beifei */
}
if(k==-1) printf("\n\nNO exist!please again");
}
while(k==-1);
printf_face();
printf_one(k);
w1=modify_score1(k);
if(w1==1)
{printf("\nSuccessful ^_^.\n\nAre you modify another score?\n\n\t1.Yes2.Back with save\t[ ]\b\b");
scanf("%d",&w0);
w2=1;
}
else
{w0=0; /* end */
if(w2==1)
stu[k]=s;
}
if(w0!=1&&w2==1) save(n); /* w0!=1 return w2==1 modify */
}
while(w0==1);
menu();
}
order()
{int i,j,k,n;
struct student s;
n=load();
for(i=0;i<n-1;i++)
{k=i;
for(j=i+1;j<n;j++)
if(stu[j].num<stu[k].num) k=j;
s=stu[i];stu[i]=stu[k];stu[k]=s;
}
save(n);
puts("\n\n");
printf_back();
}
browse()
{int i,j,n;
n=load();
printf_face();
for(i=0;i<n;i++)
{if((i!=0)&&(i%10==0))
{printf("\n\nPass any key to contiune ...");
getch();
puts("\n\n");
}
printf_one(i);
printf("\n");
}
printf("\tThere are %d record.\n",n);
printf("\nPass any key to back...");
getch();
menu();
}
save(int n)
{FILE *fp;
int i;
if((fp=fopen("score.txt","wb"))==NULL)
{printf("\nCannot open file\n");
return NULL;
}
for(i=0;i<n;i++)
if(stu[i].sum!=0)
if(fwrite(&stu[i],sizeof(struct student),1,fp)!=1)
printf("file write error\n");
fclose(fp);
}
load()
{FILE *fp;
int i;
if((fp=fopen("score.txt","rb"))==NULL)
{printf("\nCannot open file\n");
return NULL;
}
for(i=0;!feof(fp);i++)
fread(&stu[i],sizeof(struct student),1,fp);
fclose(fp);
return(i-1);
}
no_input(int i,int n)
{int k,w1;
do
{w1=0;
printf("NO.:031073-");
scanf("%d",&stu[i].num);
if(stu[i].num<1 || stu[i].num>N)
{puts("Input error! Only be made up of(1-N).Please reinput!\n");
w1=1;
}
if(w1!=1)
for(k=0;k<n;k++)
if(k!=i&&(stu[k].num==stu[i].num))
{puts("This record is exist. Please reinput!\n");
w1=1;break;
}
}
while(w1==1);
}
enter_score(int i)
{printf("Math English Physical");
scanf("%d %d %d",&stu[i].Math,&stu[i].English,&stu[i].Physical);
}
sum(int i)
{
stu[i].sum=stu[i].Math+stu[i].English+stu[i].Physical;
}
input(int i)
{no_input(i,i);
printf("name: age:");
scanf("%s %d",stu[i].name,&stu[i].age);
enter_score(i);
sum(i);
}
modify_score1(int i)
{int c,w1;
do
{
puts("\nmodify by=>\n\n 1.Math 2.English 3.Physical4.all score 5.cancel and back");
printf("Which you needed?:[ ]\b\b");
scanf("%d",&c);
if(c>5||c<1)
{puts("\nChoice error! Please again!");
getchar();
}
}
while(c>5||c<1);
do
{switch(c)
{
case 1:printf("Math:");scanf("%d",&stu[i].Math);break;
case 2:printf("English:");scanf("%d",&stu[i].English);break;
case 3:printf("Physical:");scanf("%d",&stu[i].Physical);break;
case 4:enter_score(i);break;
case 5:break;
}
if(c>0&&c<5) sum(i);
puts("\nNow:\n");
printf_face();
printf_one(i);
printf("\nAre you sure?\n\n\t1.Sure 2.No and remodify3.Back without save in this time [ ]\b\b");
scanf("%d",&w1);
}
while(w1==2);
return(w1);
}
modify_data(int i,int n)
{int c,w1;
do
{
puts("\nmodify by=>\n\n 1.NO. 2.name 3.age 4.Math 5.English 6.Physical7.all score 8.all data 9.cancel and back");
printf("Which you needed?:[ ]\b\b");
scanf("%d",&c);
if(c>9||c<1)
{puts("\nChoice error! Please again!");
getchar();
}
}
while(c>9||c<1);
do
{switch(c)
{case 1:no_input(i,n);break;
case 2:printf("name:");scanf("%s",stu[i].name);break;
case 3:printf("age:");scanf("%d",&stu[i].age);break;
case 4:printf("Math:");scanf("%d",&stu[i].Math);break;
case 5:printf("English:");scanf("%d",&stu[i].English);break;
case 6:printf("Physical:");scanf("%d",&stu[i].Physical);break;
case 7:enter_score(i);break;
case 8:input(i);break;
case 9:break;
}
if(c>3&&c<8) sum(i);
puts("\nNow:\n");
printf_face();
printf_one(i);
printf("\nAre you sure?\n\n\t1.Sure 2.No and remodify3.Back without save in this time [ ]\b\b");
scanf("%d",&w1);
}
while(w1==2);
return(w1);
}
printf_face()
{printf("\nNO.031073 name age Math English Physical sum\n");
}
printf_one(int i)
{
printf("%6d %8s %4d",stu[i].num,stu[i].name,stu[i].age);
printf("%5d %5d %8d %10d",stu[i].Math,stu[i].English,stu[i].Physical,stu[i].sum);
}
printf_back()
{int k,w;
printf("\n\n\tSuccessful.^_^\n\n");
printf("What do you want to do?\n\n\t1.Browse all now\t2.Back:[ ]\b\b");
scanf("%d",&w);
if(w==1) browse();
else menu();
}
menu()
{int w1;
char n;
do
{
puts("\t\t****************MENU****************\n\n");
puts("\t\t\t\tA.Enter new data");
puts("\t\t\t\tB.Addition data");
puts("\t\t\t\tC.Modify data");
puts("\t\t\t\tD.Delete data");
puts("\t\t\t\tE.Modify score");
puts("\t\t\t\tF.Order by number");
puts("\t\t\t\tG.Browse all");
puts("\t\t\t\tH.Exit");
puts("\n\n\t\t************************************\n");
printf("Choice your number(A-H):[ ]\b\b");
n=getchar();
printf("\n");
if(n<'A'||n>'H')
w1=1;
else w1=0;
}
while(w1==1);
switch(n)
{case 'A':enter();break;
case 'B':add();break;
case 'C':modify();break;
case 'D':delete();break;
case 'E':modify_score();break;
case 'F':order();break;
case 'G':browse();break;
case 'H':exit(0);
}
}
char password[7]="123456";
main()
{
char s[7];
printf("\t\t请输入密码:\n\t\t\n\t\t");
scanf("%s",s);
if(!strcmp(s,password))
{
printf("\n\t\t恭喜你进入学生成绩管理系统\n");
menu();
}
else
{
printf("\t\t 密码错误\n\n");
main();
}
}
#include"stdio.h"
#include<string.h>
#include<stdlib.h>
#define N 30
struct student
{
int num;
char name[20];
int age;
int Math;
int English;
int Physical;
long int sum;
}stu[N];
enter()
{int i,n;
printf("How many students(1-%d)?:",N);
scanf("%d",&n);
printf("\nEnter data now\n\n");
for(i=0;i<n;i++)
{printf("\n Input %dth student record.\n",i+1);
input(i);
}
if(i!=0) save(n);
printf_back(); /* browse or back */
}
add()
{int i,n,m,k;
FILE *fp;
n=load();
printf("How many students are you want to add(1-%d)?:",N-n);
scanf("%d",&m);
k=m+n;
for(i=n;i<k;i++)
{printf("\n Input %dth student record.\n",i+1);
input(i);
}
if((fp=fopen("score.txt","ab"))==NULL)
{printf("Cannot open file.\n");
}
for(i=n;i<k;i++)
if(fwrite(&stu[i],sizeof(struct student),1,fp)!=1)
printf("file write error.\n");
fclose(fp);
printf_back();
}
/* insert()
{int n,c;
struct student s;
n=load();
puts("\n Input one data.\n");
do
{input(n);
printf_face();
printf_one(n);
printf("\n\nAre you sure?\n\n\t 1.Sure\t2.cancel and again\t3.Back without save [ ]\b\b");
scanf("%d",&c);
if(c==1)
{
save(n+1);
printf_back();
}
else if(c!=2) menu();
}
while(c==2);
} */
modify()
{struct student s;
FILE *fp;
int i,n,k,w0=1,w1,w2=0;
n=load();
do
{
k=-1;
printf_face();
for(i=0;i<n;i++)
{if((i!=0)&&(i%10==0))
{printf("\n\nRemember NO.031073- which needed modify.Pass any key to continue ...");
getch();
puts("\n\n");
}
printf_one(i);
printf("\n");
}
do
{printf("\n\nEnter NO.031073- that you want to modify! NO.:031073-");
scanf("%d",&s.num);
for(i=0;i<n;i++)
if(s.num==stu[i].num)
{k=i;
s=stu[i]; /* chengji beifei */
}
if(k==-1) printf("\n\nNO exist!please again");
}
while(k==-1);
printf_face();
printf_one(k);
w1=modify_data(k,n);
if(w1==1)
{printf("\nSuccessful ^_^.\n\nAre you modify another?\n\n\t1.Yes2.Back with save\t[ ]\b\b");
scanf("%d",&w0);
w2=1;
}
else
{w0=0; /* end */
if(w2==1)
stu[k]=s;
}
if(w0!=1&&w2==1) save(n); /* w0!=1 return w2==1 modify */
}
while(w0==1);
menu();
}
delete()
{struct student s;
FILE *fp;
int i,n,k,w0=1,w1,w2=0;
n=load();
do
{
k=-1;
printf_face();
for(i=0;i<n;i++)
{if((i!=0)&&(i%10==0))
{printf("\n\nRemember NO.031073- which needed delete.Pass any key to continue ...");
getch();
puts("\n\n");
}
printf_one(i);
printf("\n");
}
do
{printf("\n\nEnter NO.031073- that you want to delete! NO.:031073-");
scanf("%d",&s.num);
for(i=0;i<n;i++)
if(s.num==stu[i].num)
{k=i;
s=stu[i]; /* chengji beifei */
}
if(k==-1) printf("\n\nNO exist!please again");
}
while(k==-1);
printf_face();
printf_one(k);
printf("\nAre you sure?\n\n\t1.Sure2.Back without save in this time [ ]\b\b");
scanf("%d",&w1);
if(w1==1)
{
stu[k].sum=0;
printf("\nSuccessful ^_^.\n\nAre you delete another?\n\n\t1.Yes2.Back with save\t[ ]\b\b");
scanf("%d",&w0);
w2=1;
}
else
{w0=0; /* end */
if(w2==1)
stu[k]=s;
}
if(w0!=1&&w2==1) save(n);
}
while(w0==1);
menu();
}
modify_score()
{struct student s;
FILE *fp;
int i,n,k,w0=1,w1,w2=0;
n=load();
do
{
k=-1;
printf_face();
for(i=0;i<n;i++)
{if((i!=0)&&(i%10==0))
{printf("\n\nRemember NO.031073 which score needed modify.Pass any key to continue ...");
getch();
puts("\n\n");
}
printf_one(i);
printf("\n");
}
do
{printf("\n\nEnter NO.031073- that you want to modify! NO.:031073-");
scanf("%d",&s.num);
for(i=0;i<n;i++)
if(s.num==stu[i].num)
{k=i;
s=stu[i]; /* chengji beifei */
}
if(k==-1) printf("\n\nNO exist!please again");
}
while(k==-1);
printf_face();
printf_one(k);
w1=modify_score1(k);
if(w1==1)
{printf("\nSuccessful ^_^.\n\nAre you modify another score?\n\n\t1.Yes2.Back with save\t[ ]\b\b");
scanf("%d",&w0);
w2=1;
}
else
{w0=0; /* end */
if(w2==1)
stu[k]=s;
}
if(w0!=1&&w2==1) save(n); /* w0!=1 return w2==1 modify */
}
while(w0==1);
menu();
}
order()
{int i,j,k,n;
struct student s;
n=load();
for(i=0;i<n-1;i++)
{k=i;
for(j=i+1;j<n;j++)
if(stu[j].num<stu[k].num) k=j;
s=stu[i];stu[i]=stu[k];stu[k]=s;
}
save(n);
puts("\n\n");
printf_back();
}
browse()
{int i,j,n;
n=load();
printf_face();
for(i=0;i<n;i++)
{if((i!=0)&&(i%10==0))
{printf("\n\nPass any key to contiune ...");
getch();
puts("\n\n");
}
printf_one(i);
printf("\n");
}
printf("\tThere are %d record.\n",n);
printf("\nPass any key to back...");
getch();
menu();
}
save(int n)
{FILE *fp;
int i;
if((fp=fopen("score.txt","wb"))==NULL)
{printf("\nCannot open file\n");
return NULL;
}
for(i=0;i<n;i++)
if(stu[i].sum!=0)
if(fwrite(&stu[i],sizeof(struct student),1,fp)!=1)
printf("file write error\n");
fclose(fp);
}
load()
{FILE *fp;
int i;
if((fp=fopen("score.txt","rb"))==NULL)
{printf("\nCannot open file\n");
return NULL;
}
for(i=0;!feof(fp);i++)
fread(&stu[i],sizeof(struct student),1,fp);
fclose(fp);
return(i-1);
}
no_input(int i,int n)
{int k,w1;
do
{w1=0;
printf("NO.:031073-");
scanf("%d",&stu[i].num);
if(stu[i].num<1 || stu[i].num>N)
{puts("Input error! Only be made up of(1-N).Please reinput!\n");
w1=1;
}
if(w1!=1)
for(k=0;k<n;k++)
if(k!=i&&(stu[k].num==stu[i].num))
{puts("This record is exist. Please reinput!\n");
w1=1;break;
}
}
while(w1==1);
}
enter_score(int i)
{printf("Math English Physical");
scanf("%d %d %d",&stu[i].Math,&stu[i].English,&stu[i].Physical);
}
sum(int i)
{
stu[i].sum=stu[i].Math+stu[i].English+stu[i].Physical;
}
input(int i)
{no_input(i,i);
printf("name: age:");
scanf("%s %d",stu[i].name,&stu[i].age);
enter_score(i);
sum(i);
}
modify_score1(int i)
{int c,w1;
do
{
puts("\nmodify by=>\n\n 1.Math 2.English 3.Physical4.all score 5.cancel and back");
printf("Which you needed?:[ ]\b\b");
scanf("%d",&c);
if(c>5||c<1)
{puts("\nChoice error! Please again!");
getchar();
}
}
while(c>5||c<1);
do
{switch(c)
{
case 1:printf("Math:");scanf("%d",&stu[i].Math);break;
case 2:printf("English:");scanf("%d",&stu[i].English);break;
case 3:printf("Physical:");scanf("%d",&stu[i].Physical);break;
case 4:enter_score(i);break;
case 5:break;
}
if(c>0&&c<5) sum(i);
puts("\nNow:\n");
printf_face();
printf_one(i);
printf("\nAre you sure?\n\n\t1.Sure 2.No and remodify3.Back without save in this time [ ]\b\b");
scanf("%d",&w1);
}
while(w1==2);
return(w1);
}
modify_data(int i,int n)
{int c,w1;
do
{
puts("\nmodify by=>\n\n 1.NO. 2.name 3.age 4.Math 5.English 6.Physical7.all score 8.all data 9.cancel and back");
printf("Which you needed?:[ ]\b\b");
scanf("%d",&c);
if(c>9||c<1)
{puts("\nChoice error! Please again!");
getchar();
}
}
while(c>9||c<1);
do
{switch(c)
{case 1:no_input(i,n);break;
case 2:printf("name:");scanf("%s",stu[i].name);break;
case 3:printf("age:");scanf("%d",&stu[i].age);break;
case 4:printf("Math:");scanf("%d",&stu[i].Math);break;
case 5:printf("English:");scanf("%d",&stu[i].English);break;
case 6:printf("Physical:");scanf("%d",&stu[i].Physical);break;
case 7:enter_score(i);break;
case 8:input(i);break;
case 9:break;
}
if(c>3&&c<8) sum(i);
puts("\nNow:\n");
printf_face();
printf_one(i);
printf("\nAre you sure?\n\n\t1.Sure 2.No and remodify3.Back without save in this time [ ]\b\b");
scanf("%d",&w1);
}
while(w1==2);
return(w1);
}
printf_face()
{printf("\nNO.031073 name age Math English Physical sum\n");
}
printf_one(int i)
{
printf("%6d %8s %4d",stu[i].num,stu[i].name,stu[i].age);
printf("%5d %5d %8d %10d",stu[i].Math,stu[i].English,stu[i].Physical,stu[i].sum);
}
printf_back()
{int k,w;
printf("\n\n\tSuccessful.^_^\n\n");
printf("What do you want to do?\n\n\t1.Browse all now\t2.Back:[ ]\b\b");
scanf("%d",&w);
if(w==1) browse();
else menu();
}
menu()
{int w1;
char n;
do
{
puts("\t\t****************MENU****************\n\n");
puts("\t\t\t\tA.Enter new data");
puts("\t\t\t\tB.Addition data");
puts("\t\t\t\tC.Modify data");
puts("\t\t\t\tD.Delete data");
puts("\t\t\t\tE.Modify score");
puts("\t\t\t\tF.Order by number");
puts("\t\t\t\tG.Browse all");
puts("\t\t\t\tH.Exit");
puts("\n\n\t\t************************************\n");
printf("Choice your number(A-H):[ ]\b\b");
n=getchar();
printf("\n");
if(n<'A'||n>'H')
w1=1;
else w1=0;
}
while(w1==1);
switch(n)
{case 'A':enter();break;
case 'B':add();break;
case 'C':modify();break;
case 'D':delete();break;
case 'E':modify_score();break;
case 'F':order();break;
case 'G':browse();break;
case 'H':exit(0);
}
}
char password[7]="123456";
main()
{
char s[7];
printf("\t\t请输入密码:\n\t\t\n\t\t");
scanf("%s",s);
if(!strcmp(s,password))
{
printf("\n\t\t恭喜你进入学生成绩管理系统\n");
menu();
}
else
{
printf("\t\t 密码错误\n\n");
main();
}
}
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
深圳市校管家教育科技有限公司_
2024-02-23 广告
2024-02-23 广告
选择培训学校管理系统,需要考虑多方面因素,如系统功能。培训学校管理系统实现了动态的网络化管理,提高了各职能部门的协同办公效能。培训学校管理系统是针对培训学校的管理和教学特点而设计的高效协同工作平台和优秀的综合管理系统。具体费用不是一定的,和...
点击进入详情页
本回答由深圳市校管家教育科技有限公司_提供
2013-01-17
展开全部
酱哄像眉最轮星抛浴推
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-01-17
展开全部
炊选诵推基科润咽帖骨
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-01-17
展开全部
俊控亡衬档棵育急蛇挠
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询