中易网

急!这个C语言程序的流程图怎么画?

答案:2  悬赏:60  
解决时间 2021-03-01 03:10
#include
#include

#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;
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 {
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);
scanf("%d",&st[i].course3);
printf("Please input the %d's student's course4:",st[i].sno);
scanf("%d",&st[i].course4);
st[i].aver=(st[i].course1+st[i].course2+st[i].course3+st[i].course4)/4;
}
for(i=0;i printf("The %d's student's aver-score is:%d\n",st[i].sno,st[i].aver);
for(i=0;i {
total1+=st[i].course1;
total2+=st[i].course2;
total3+=st[i].course3;
total4+=st[i].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 for(j=i+1;j if(st[i].aver {
temp=st[i];
st[i]=st[j];
st[j]=temp;
}
printf("The list of the student's course:\n");
printf("==========\n");
for(i=0;i {
printf("%d.",i+1);
printf("%dth student:%d\n",st[i].sno,st[i].aver);
}
谢谢了
最佳答案
这里不能传图片,我把答案写成word发在百度文库里了,名字叫《c语言流程图》。需要的话可以找找。希望对你有用。
全部回答
如果会编程序而不会画流程图,建议先把自己的程序研究一遍。 若是画主程序流程图,那就需看懂主函数的程序,按照main()函数中的具体书写过程来画,例如: 程序开始---定义变量---初始化变量---使用选择或者循环或者顺序结构---调用某一个子函数(可以没有)---程序结束 以上是最简单的程序流程图画法。 若你是画某一算法或是某一模块的流程图,就要把相应的算法或是模块看懂。分析算法或是模块的具体走法,根据此走法就可以画出对应的流程图。 如果你是初学者,想根据流程图的画法而去尝试编程,建议就一定要研究清楚每一个使用到的算法,读懂题目再开始编程。 下面是使viso画流程图的几个要点: 1、选择下载一个合适版本的viso 2、程序开始结束用胶囊 3、分页用圆圈 4、输入用平行四边形 5、语句用方块 6、判断用菱形 7、打印用波浪
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
问路:从南宁到靖西(全程不上高速)走那条路好
衢州市公路管理处在什么地方啊,我要过去处理
有没查看卡车的应用
恒翔钢材地址有知道的么?有点事想过去
新堂城市商业广场地址在哪,我要去那里办事
windown7系统安装哪个版本的word比较好?
急急急~四季桂花,求修剪方法,该剪哪个枝,
色彩鲜调与浊调,明调与暗掉,这两对有什么区
我的鱼缸没放过硝化细菌,为什么水清的透明,
关于环保的英语文章
楚乔传大结局是什么主要剧情概括 小说结
天怡嘉园我想知道这个在什么地方
湛蓝的梦英文怎麼写?谢谢
VB listview用法
眉飞色舞怎么去啊,有知道地址的么
推荐资讯
我是一名高中生 对ui设计没有兴趣 但听说工资
安南推拿在哪里啊,我有事要去这个地方
一块长9米,宽7米的广告牌,要在它的一面的四周
工程图零件图怎么看是基孔制还是基轴制
为什么我的微元素网站画面显示不出来?
蜀门辅助法宝属性下面最大是什么意思
deal with it这种图要怎么做出来
(根号2+根号3-1)(根号2-根号3+1)
芙蓉园茶楼地址有知道的么?有点事想过去
尊贵生活电器馆地址在哪,我要去那里办事
汇峰大饭店地址有知道的么?有点事想过去
大邑雾中山怎么去
手机登qq时,显示手机磁盘不足,清理后重新登
刺客的套装怎么选啊?