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.
lzlzlz/学生信息管理函数完整版.c

54 lines
1.4 KiB

6 years ago
#include<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD><E6BAAF>.c"
void modify()/*<2A>޸ĺ<DEB8><C4BA><EFBFBD>*/
{
int num,j,i;
char s1[LEN+1],s2[LEN+1];/*<2A><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD>µ<EFBFBD>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD>Ϣ*/
loop:printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>޸<EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD>ţ<EFBFBD>");
scanf("%s",s1);
for(i=0;i<n;i++)
if(strcmp(stu[i].id,s1)==0)
num=i;
else
{
printf("<EFBFBD><EFBFBD>ѧ<EFBFBD>Ų<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\n");
goto loop;/*<2A><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><D1A7>*/
}
printf("------------------\n");
printf("1.<2E>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n");
printf("2.<2E>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>\n");
printf("3.<2E>޸<EFBFBD><DEB8>Ա<EFBFBD>\n");
printf("4.<2E>޸ij<DEB8><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
printf("5.<2E>޸ĵ<DEB8>ַ\n");
printf("6.<2E>޸ĵ绰<C4B5><E7BBB0><EFBFBD><EFBFBD>\n");
printf("7.<2E>޸<EFBFBD>E-mail<69><6C>ַ\n");
printf("8.<2E>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>˵<EFBFBD>\n");
printf("------------------\n");
printf("<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>Ĺ<EFBFBD><EFBFBD>ܱ<EFBFBD><EFBFBD>ţ<EFBFBD>");
scanf("%d",&j);
switch(j)
{
case 1: printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
scanf("%s",s2);
strcpy(stu[num].name,s2);break;
case 2: printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
scanf("%d",&stu[num].age);break;
case 3: printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD><EFBFBD>Ա<EFBFBD>:");
scanf("%s",s2);
strcpy(stu[num].sex,s2);break;
case 4: printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µij<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
scanf("%s",s2);
strcpy(stu[num].birth,s2);break;
case 5: printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µĵ<EFBFBD>ַ:");
scanf("%s",s2);
strcpy(stu[num].add,s2);break;
case 6: printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µĵ绰<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
scanf("%s",s2);
strcpy(stu[num].tel,s2);break;
case 7: printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD>ַ:");
scanf("%s",s2);
strcpy(stu[num].email,s2);break;
case 8: return;
default: printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>1-8<>н<EFBFBD><D0BD><EFBFBD>ѡ<EFBFBD><D1A1>\n");
}
}