为什么学号都不能输出呢?帮忙看一下哪里错了,谢谢了!
#include "stdio.h"#include "conio.h"
#define N 3
struct student
{ long int number;
char name[10];
float s[4];
}
main()
{ struct student stu[N];
float sum,k;
int i,j,select;
printf("\t\t\t***--------------------------------------------***\t\t\t\n");
printf("\t\t\t*** ***\t\t\t\n");
printf("\t\t\t*** Welcome to The Student's Mangement System ***\t\t\t\n");
printf("\t\t\t*** ***\t\t\t\n");
printf("\t\t\t***--------------------------------------------***\t\t\t\n");
printf("\t\t\t*** 1.Input the student's date ***\t\t\t\n");
printf("\t\t\t*** 2.Add the student's date ***\t\t\t\n");
printf("\t\t\t*** 3.Delete the student's date ***\t\t\t\n");
printf("\t\t\t*** 4.Change the student's date ***\t\t\t\n");
printf("\t\t\t*** 5.Inquire the student's date ***\t\t\t\n");
printf("\t\t\t*** 6.Sort the student's date ***\t\t\t\n");
printf("\t\t\t*** 7.Statistics the student's date ***\t\t\t\n");
printf("\t\t\t*** 0.Escape the student's system ***\t\t\t\n");
printf("Please input select=:\n");
scanf("%d",&select);
switch (select)
{ case 1: for(i=0;i<3;i++)
{ printf("Please input the student's number=:");
scanf("%ld",stu[i].number);
printf("Please input the student's name=:");
scanf("%s",stu[i].name);
for (j=0;j<5;j++)
{printf("Please input the student's score%d=:",j+1);
scanf("%f",&k);
stu[i].s[j]=k;}}
printf("||%number||name||score1||score2||score3||score4||score5||\n");
for (j=0;j<3;j++)
{printf("||%ld ||%s ||%8.1f ||%8.1f ||%8.1f ||%8.1f ||%8.1f ||\n",stu[j].number,stu[j].name,stu[j].s[0],stu[j].s[1],stu[j].s[2],stu[j].s[3],stu[j].s[4]);
printf("\n");}
printf("please wait input any kay continue");
getch();
break;}
}
}