You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
1.3 KiB

6 years ago
#include<stdio.h>
struct student
{
int num;
char name[20];
int year;
char sex[10];
int birth[20];
char home[100];
int tel;
char e[20];
}stu[n];
void one()
{
int opt1;
printf("----------<2D><>ӭʹ<D3AD><CAB9>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ϵͳ----------");
printf("\n\n");
printf(" 1: 2: 3: 4: ");
printf(" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1 2 3 4 5<>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD>в<EFBFBD><D0B2><EFBFBD>:");
loop: scanf("%d",&opt1);
switch(opt1)
{
case 1: info();break;
case 2: data();break;
case 3: look();break;
case 4: help();break;
case 5: break;
default:
printf(" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1 2 3 4 5<>е<EFBFBD>һ<EFBFBD><D2BB>");
scanf("%d",&opt1);
goto loop;
}
}
void info()
{
int opt2;
printf("\n\n <20><>ӭ<EFBFBD><D3AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD> \n\n");
printf(" 1.ѧ<><D1A7><EFBFBD><EFBFBD>Ϣ¼<CFA2><C2BC>\n\n2<EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>\n\n");
printf(" 3.<2E><><EFBFBD><EFBFBD>\n\n");
printf(" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1 2 3<>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD>в<EFBFBD><D0B2><EFBFBD>");
loop: scanf("%d",&opt2)
switch(opt2)
{
case 1: info_1();break;
case 2: info_2();break;
case 3: one();break;
default:
{
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1 2 3<>е<EFBFBD>һ<EFBFBD><D2BB>");
goto loop;
}
}
}
void info_1()
{
FILE *fp;
int s,i,count;
count=0;
i=1;
if((fp=fopen("stu","rb+"))==NULL)
{
if((fp=fopen("stu","Wb"))==NULL)
{
printf("")
exit(1);
}
stu[0].num=0;
}
else
{
fclose(fp);
}
}