From ca77e46583fe4c4da3be6b51bd5b2c71786c16a4 Mon Sep 17 00:00:00 2001 From: Cx330 <2011690092@qq.com> Date: Sat, 15 Apr 2023 15:47:44 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Cx330=5F=E7=BB=9F=E8=AE=A1=E5=90=84?= =?UTF-8?q?=E5=88=86=E6=95=B0=E6=AE=B5=E7=9A=84=E5=AD=A6=E7=94=9F=E4=BA=BA?= =?UTF-8?q?=E6=95=B0=E5=8F=8A=E6=89=80=E5=8D=A0=E7=9A=84=E7=99=BE=E5=88=86?= =?UTF-8?q?=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b9fd08..d889cb7 100644 --- a/README.md +++ b/README.md @@ -282,7 +282,27 @@ void SearchbyName(STU stu[],int n,int m) ``` void StatisticAnalysis(STU stu[],int n,int m) { - + int i,j,t[6]; + for(j=0;j=0&&stu[i].score[j]<60) t[0]++; + else if(stu[i].score[j]<70) t[1]++; + else if(stu[i].score[j]<80) t[2]++; + else if(stu[i].score[j]<90) t[3]++; + else if(stu[i].score[j]<100) t[4]++; + else if(stu[i].score[j]==100) t[5]++; + } + for(i=0;i<=5;i++) + { + if(i==0) printf("<60\t%d\t%.2f%%\n",t[i],(float)t[i]/n*100); + else if(i==5) printf("%d\t%d\t%.2f%%\n",(i+5)*10,t[i],(float)t[i]/n*100); + else printf("%d-%d\t%d\t%.2f%%\n",(i+5)*10,(i+5)*10+9,t[i],(float)t[i]/n*100); + } + } } ``` From ab295085df7da0e817b1612684221d4e782cb637 Mon Sep 17 00:00:00 2001 From: Cx330 <2011690092@qq.com> Date: Sat, 15 Apr 2023 19:21:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Cx330=5F=E6=8C=89=E5=AD=A6=E5=8F=B7?= =?UTF-8?q?=E6=9F=A5=E6=89=BE=E5=AD=A6=E7=94=9F=E6=88=90=E7=BB=A9=E5=B9=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=9F=A5=E6=89=BE=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d889cb7..8fc5e5d 100644 --- a/README.md +++ b/README.md @@ -304,6 +304,7 @@ void StatisticAnalysis(STU stu[],int n,int m) } } } + ``` //函数功能:打印学生成绩