下面程序的流程图怎么画?我在下面画了一个样图。若是有什么不足之处,请指出 #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.sno); printf("Please input the %d's student's course1:",st.sno); scanf("%d",&st.course1); printf("Please input the %d's student's course2:",st.sno); scanf("%d",&st.course2); printf("Please input the %d's student's course3:",st.sno); scanf("%d",&st.course3); printf("Please input the %d's student's course4:",st.sno); scanf("%d",&st.course4); st.aver=(st.course1+st.course2+st.course3+st.course4)/4; } for(i=0;i<number;i++)/*输出每个学生的平均分*/ printf("The %d's student's aver-score is:%d\n",st.sno,st.aver); for(i=0;i<number;i++)/*输出每科目平均分*/ { total1+=st.course1; total2+=st.course2; total3+=st.course3; total4+=st.course4; } total1/=number; total2/=number; total3/=number; total4/=number; printf("The averscore of course1 is:%d\n",total1); printf("The averscore of course2 is:%d\n",total2); printf("The averscore of course3 is:%d\n",total3); printf("The averscore of course4 is:%d\n",total4); for(i=0;i<number-1;i++)/*进行冒泡排序*/ for(j=i+1;j<number;j++) if(st.aver<st[j].aver) { temp=st; st=st[j]; st[j]=temp; } printf("The list of the student's course:\n"); printf("==========\n");/*列表公布成绩*/ for(i=0;i<number;i++) { printf("%d.",i+1); printf("%dth student:%d\n",st.sno,st.aver); } } 我使用的工具是Microsoft Visio,这个工具很好画流程图,麻烦帮我看看正确不...
|