老师要我们用这短代码来写流程图 大神门帮帮忙
#include<stdio.h>#define N 3
struct student
{ char name[8];
char sex;
int age;
float score;
}a[N];
int main()
{
int sumage=0,i;
float sumscore=0;
printf("请输入同学的姓名,性别,年龄和成绩\n");
for(i=0;i<N;i++)
{ printf("第%d位同学的信息:\n",i+1);
scanf("%sV%c%d%f",a[i].name,&a[i].sex, &a[i].age, &a[i].score);
sumage+=a[i].age;
sumscore+=a[i].score;
}
printf("\n平均分:%0.1f\n",sumscore/N);
printf("平均年龄:%d\n",sumage/N);
sumscore=sumscore/N;
printf("\n高于平均分的同学是:\n");
for(i=0;i<N;i++)
if( a[i].score>sumscore)
printf("%s %c %d %.1f\n",a[i].name, a[i].sex, a[i].age, a[i].score);
}