兄弟姐妹 帮帮忙 写下这个程序的 流程图好吗
急急急急急急急急急急急急急!!!!!!!
#include<stdlib.h>
#include<stdio.h>
#include<malloc.h>
#include<conio.h>
#include<memory.h>
#define LEN sizeof(struct node)
//学生表
struct node{
char Linkdate[12];//学号
int fraction;//分数
int fractiong;//分数段
struct node *next;
};
typedef struct node *LINK;
LINK head;
LINK s;
int stddata;//学生总人数
int gdata[10];//各分数段总人数
void setuplinklist();
main()
{
setuplinklist();
printf("分数在0-10的人数为 %d\n",gdata[0]);
printf("分数在10-20的人数为 %d\n",gdata[1]);
printf("分数在20-30的人数为 %d\n",gdata[2]);
printf("分数在30-40的人数为 %d\n",gdata[3]);
printf("分数在40-50的人数为 %d\n",gdata[4]);
printf("分数在50-60的人数为 %d\n",gdata[5]);
printf("分数在60-70的人数为 %d\n",gdata[6]);
printf("分数在70-80的人数为 %d\n",gdata[7]);
printf("分数在80-90的人数为 %d\n",gdata[8]);
printf("分数在90-100的人数为 %d\n",gdata[9]);
}
void setuplinklist()
{
int i=0;int h;
LINK p;
head=NULL;p=head;
for(int t=0;t<10;t++)
{
gdata[t]=0;
}
printf("\n");
printf("学生总人数 ");
scanf("%d",&stddata);
while(i!=stddata)
{
s=(struct node *)malloc(LEN);
printf("请输入第%d个同学的学号 ",i+1);
scanf("%s",s->Linkdate);
printf("请输入第%d个同学的成绩 ",i+1);
scanf("%d",&s->fraction);
if(s->fraction<=10)
{
s->fractiong=1;
gdata[0]++;
}
if(s->fraction>10&&s->fraction<=20)
{
s->fractiong=2;
gdata[1]++;
}
if(s->fraction>20&&s->fraction<=30)
{
s->fractiong=3;
gdata[2]++;
}
if(s->fraction>30&&s->fraction<=40)
{
s->fractiong=4;
gdata[3]++;
}
if(s->fraction>40&&s->fraction<=50)
{
s->fractiong=5;
gdata[4]++;
}
if(s->fraction>50&&s->fraction<=60)
{
s->fractiong=6;
gdata[5]++;
}
if(s->fraction>60&&s->fraction<=70)
{
s->fractiong=7;
gdata[6]++;
}
if(s->fraction>70&&s->fraction<=80)
{
s->fractiong=8;
gdata[7]++;
}
if(s->fraction>80&&s->fraction<=90)
{
s->fractiong=9;
gdata[8]++;
}
if(s->fraction>90&&s->fraction<=100)
{
s->fractiong=10;
gdata[9]++;
}
if(head==NULL)
head=s;
else
p->next=s;
p=s;
i++;
}
p->next=NULL;
}