background image

语言流程图

下面程序的流程图怎么画?我在下面画了一个样图。若是有什么不

足之处,请谅解。

#include<stdio.h>
#include<stdlib.h>

#define N 1024

typedef struct node
{
 int sno;/*这里分别是学号(便于最后列表时统计),四门课的分数,总分,
平均分*/
 int course1;
 int course2;
 int course3;
 int course4;
 int aver;
}student;

void main()
{
 int i,j,number;
 int total1,total2,total3,total4;
 total1=total2=total3=total4=0;/*total 指的是四门课程的平均分*/
 student st[N],temp;
 printf("Please input the student's number:");/*确定学生人数*/
 scanf("%d",&number);
 if(number>1024)
 {
  printf("The number is too large!\n");
  exit(0);
 }
 for(i=0;i<number;i++)/*进行成绩输入*/
 {
  printf("Please input the %dth student's sno:",i+1);
  scanf("%d",&st[i].sno);
  printf("Please input the %d's student's course1:",st[i].sno);
  scanf("%d",&st[i].course1);
  printf("Please input the %d's student's course2:",st[i].sno);
  scanf("%d",&st[i].course2);
  printf("Please input the %d's student's course3:",st[i].sno);