这段代码该如何修改???
#include<stdio.h>
#include<stdlib.h>
#define N 8
int geshu=0;//个数
struct xuesheng
{
int num,gainum;//第2个是用来改学号的
char name[15],gaixingming[15];//不会改字符串
int chengji1;
int cj2;
int cj3;
int cj4;
int Class;
int avg;
int sum;
int gaiavg;
int gaisum;
void jiemian()
{
printf("1:添加学生信息\n");
printf("2:显示学生信息\n");
printf("3:返回系统界面\n");
printf("4:查找学生信息\n");
printf("5:插入学生信息\n");
printf("6:删除学生信息\n");
printf("7:修改学生信息\n");
printf("0:退出\n");
}//界面
void main()
{
int shu;
system("cls");
jiemian();
do
{
printf("\n请输入功能键:");
scanf("%d",&shu);
if(shu>=1 && shu<=7)
{switch(shu)
{case 1:tianjia();break;
case 2:xianshi();paixu();break;
case 3:system("cls");jiemian();break;
case 4:chazhao();break;
case 5:charu();break;
case 6:shanchu();break;
case 7:xiugai();break;
case 0:exit(0);break;}
}
else
{printf("错误,请输入1-3的数字功能\n");}
}while(shu!=0);//功能表
} 作者:
liuxun1977 时间: 2009-5-25 13:50
我找了一下 还有四个错找不出来
#include<stdio.h>
#include<stdlib.h>
#define N 8
int geshu=0;//个数
struct xuesheng
{
int num,gainum;//第2个是用来改学号的
char name[15],gaixingming[15];//不会改字符串
int chengji1;
int cj2;
int cj3;
int cj4;
int Class;
int avg;
int sum;
int gaiavg;
int gaisum;
int main()
{
int shu;
system("cls");
jiemian();
do
{
printf("\n请输入功能键:");
scanf("%d",&shu);
if(shu>=1 && shu<=7)
{switch(shu)
{case 1:tianjia();break;
case 2:xianshi();paixu();break;
case 3:system("cls");jiemian();break;
case 4:chazhao();break;
case 5:charu();break;
case 6:shanchu();break;
case 7:xiugai();break;
case 0:exit(0);break;}
}
else
{printf("错误,请输入1-3的数字功能\n");}
}while(shu!=0);//功能表