求解,case里面的问题
#include "stdio.h"#define N 2
int i;
struct course{
int Chinese;
int Math;
int English;
int Java;
int C;
};
struct person{
char number[15];
char name[15];
char sex[15];
struct course score;
};
void fnDataIn(struct person data[],int n);
void fnDataOut(struct person data[],int n);
void fnDataIn(struct person data[],int n)
{
printf("Pls input students:number,name,sex,course(Chinese,Math,English,Java,C)\n");
for(i=0;i<n;i++)
scanf("%s%s%s%d%d%d%d%d",data[i].number,data[i].name,data[i].sex,&data[i].score.Chinese,&data[i].score.Math,&data[i].score.English,&data[i].score.Java,&data[i].score.C);
}
void fnDataOut(struct person data[],int n)
{
for(i=0;i<n;i++)
printf("\n%s %s %s\nChinese:%d\nMath:%d\nEnglish:%d\nJava:%d\nC:%d\n",data[i].number,data[i].name,data[i].sex,data[i].score.Chinese,data[i].score.Math,data[i].score.English,data[i].score.Java,data[i].score.C);
}
void main()
{
char Plan;
struct person a[N];
fnDataIn(a,N);
fnDataOut(a,N);
printf("Pls input the Plan(A,B,C)\n");
printf("Plan A is Show each student 5 subjects in the lowest score.\n");
printf("Plan B is The number of students in each class that subjects fail.\n");
printf("Plan C is The Search for a specified number of school students information.\n");
scanf("%d",&Plan);
switch(Plan)
{
case'A':
for(i=0;i<N;i++)
{
}
case'B':
case'C':
}
getch();
}
怎么样令A为显示每个学生五门功课的最低和最高分,B为显示没门功课都不及格的人数,C为:检索学号为某指定数的学生信息