这个程序引用了调用函数吗?
#include<stdio.h>void shuru(int num1);
void look(int num1);
void modify(int num1);
void tuichu(int num1);
struct grade /* 成绩结构声明 */
{ char name[20];
int math; /* 数学成绩 */
int english; /* 英语成绩 */
int computer; /* 电脑成绩 */
};
typedef struct grade node;
node student[9];
void main()
{
int i;
int num1;
int num; /* 学生人数 */
int select;
printf("***************************************************\n");
printf("* *\n");
printf("* 欢迎进入学生成绩管理系统 *\n");
printf("* *\n");
printf("***************************************************\n");
printf("请先录入学生个人成绩及信息,请输入学生人数.(小于9) ==> ");
scanf("%d",&num); /* 读取学生人数 */
shuru(num);
}
void shuru(int num1)
{
int j=0;
int select;
int grade1,grade2,grade3;
while(j<num1)
{
printf("学生编号: %d\n",j + 1);
printf("请输入学生姓名. ==> ");
scanf("%s",&student[j].name[j]);
printf("请输入数学成绩. ==> ");
scanf("%d",&student[j].math);
printf("请输入英语成绩. ==> ");
scanf("%d",&student[j].english);
printf("请输入计算机成绩. ==> ");
scanf("%d",&student[j].computer);
++j;
}
void look(int num1)
{
int j=0;
int select;
int grade1,grade2,grade3;
}
void modify(int num1)
{
int j=0;
int select;
int grade1,grade2,grade3;
}
void tuichu(int num1)
{
int j=0;
int select;
int grade1,grade2,grade3;
}
while(1)
{
printf("*****************************************************\n");
printf("* 操 作 选 项 *\n");
printf("* 1: 查 询 成 绩 *\n");
printf("* 2: 修 改 成 绩 *\n");
printf("* 3: 退 出 操 作 *\n");
printf("*****************************************************\n");
printf("请输入选项( 1 到 3 ). ==> ");
scanf("%d",&select);
if ( select != 3 )
{
printf("请输入学生学号( 1到 9). ==> ");
scanf("%d",&num1);
}
switch(select)
{
case 1:
grade1=student[num1-1].math;
grade2=student[num1-1].english;
grade3=student[num1-1].computer;
printf("查询到学号为:%d的成绩是:math: %d english: %d computer %d\n",num1,grade1,grade2,grade3);
look(num1);
break;
case 2:
grade1=student[num1-1].math;
grade2=student[num1-1].english;
grade3=student[num1-1].computer;
printf("查询到学号为:%d的成绩是:math: %d english: %d computer %d\n",num1,grade1,grade2,grade3);
printf("请输入新成绩.==>");
scanf("%d %d %d",&grade1,&grade2,&grade3);
student[num1-1].math=grade1;
student[num1-1].english=grade2;
student[num1-1].computer=grade3;
break;
case 3:
exit(1);
break;
}
}
}