有没有高手能帮我修改一个C语言程序?
代码如下#include <process.h>
#include <string.h>
#include <stdio.h>
void zj();
void find(); //查找某同学的量化分的函数
struct stu
{char *name;
long int number;
float garde;
char reason;
}boy[3]={
{"张三",201401001,0,,'\0'},
{"李四",201401002,0,,'\0'},
{"王五",201401003,0,,'\0'},
};
main()
{
printf("**********************************************************************\n");
printf("***** *****\n");
printf("***** *****\n");
printf("***** *****\n");
printf("***** 1.查询量化分 *****\n");
printf("***** 2.添加量化分 *****\n");
printf("***** *****\n");
printf("***** *****\n");
printf("***** *****\n");
printf("**********************************************************************\n");
scanf("%d",&choose);
if (choose==1)
find();
if (choose==2)
zj();
void zj() //添加量化分
int i ; //定义变量
char e;
float a=0.0000;
for (i=0;i<3;i++)
{again:
printf("************************************");
printf(" 姓名: ","%s\n",boy[i].name);
printf(" 学号: ","%d\n",boy[i].number);
printf(" 量化分: ","%f\n",boy[i].garde);
printf(" 加分细则:","%s\n",boy[i].reason);
printf("************************************");
printf(" 请输入量化分数,输入0则跳转下一名同学"); //输入量化分细则
scanf("%f\n",&a);
if (a==0)
continue; //跳转下一位
printf(" 请输入量化分加分细则"); //选择细则,或输入细则
scanf("%c\n",&e);
printf(" 您输入的量化分数为:\n"); //打印所输入的内容
printf("%f\n",a);
printf(" 您输入的量化分加分细则为:\n");
printf("%s\n",e);
printf("是否保存?不保存请输入n,任意键保存"); //选择是否保存
scanf("%d",&choose);
if (choose==n) //如果不保存,返回again处
goto again;
boy[i].garde+=a;
strcat(boy[i].reason,e);
return(boy[i].garde,boy[i].reason);}
void find() //查找某同学的量化分的函数
int a,find,i;
again: printf("请输入查询学生的姓名或学号"); //查询学生的姓名或学号
scanf("%s\n",&find);
for(i=0;i<3;i++) //查找
if (boy[i].name==find|| boy[i].number) //如果查找的是姓名
{printf("************************************");
printf(" 姓名: ","%s\n",boy[i].name);
printf(" 学号: ","%d\n",boy[i].number);
printf(" 量化分: ","%f\n",boy[i].garde);
printf(" 加分细则:","%s\n",boy[i].reason);
printf("************************************");
printf("是否继续查找?不查找请输入n,,其余任意键继续查询,"); //询问是否继续查找
scanf("%d",&choose);
if (choose==n) //退出查找
continue;
goto again;}