From 4020c9ab588bbc5fdc2432b2d7ebfcca2a9d3d7b Mon Sep 17 00:00:00 2001 From: liyuxuan <2928130624@qq.com> Date: Thu, 20 Apr 2023 21:17:08 +0800 Subject: [PATCH 1/4] lyx --- lyx.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lyx.md diff --git a/lyx.md b/lyx.md new file mode 100644 index 0000000..b5e381e --- /dev/null +++ b/lyx.md @@ -0,0 +1,16 @@ +void AverSumofEveryStudent(STU stu[], int n, int m) +{ + int i, j; + for (i=0; i0 ? stu[i].sum / m : -1; + printf("student %d: sum = %.0f, aver = %.0f\n", +i+1, stu[i].sum, stu[i].aver); + } +} + From 7fd5aeceb9e6c09adaf292b433e0e57df48217cc Mon Sep 17 00:00:00 2001 From: liyuxuan <2928130624@qq.com> Date: Thu, 20 Apr 2023 21:17:34 +0800 Subject: [PATCH 2/4] lyx6 --- lyx6.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 lyx6.md diff --git a/lyx6.md b/lyx6.md new file mode 100644 index 0000000..87e453a --- /dev/null +++ b/lyx6.md @@ -0,0 +1,4 @@ +int Descending(float a, float b) +{ + return a > b; + } \ No newline at end of file From 1e1641551f5a656898f0ec04ca0abff1e8fad318 Mon Sep 17 00:00:00 2001 From: liyuxuan <2928130624@qq.com> Date: Thu, 20 Apr 2023 21:21:05 +0800 Subject: [PATCH 3/4] lyx10 --- lyx.10.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lyx.10.md diff --git a/lyx.10.md b/lyx.10.md new file mode 100644 index 0000000..be49cca --- /dev/null +++ b/lyx.10.md @@ -0,0 +1,23 @@ +void AsSortbyNum(STU stu[], int n, int m) +{ + int i, j, k, t; + for (i=0; i Date: Thu, 20 Apr 2023 21:22:25 +0800 Subject: [PATCH 4/4] lyx16 --- lyx16.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lyx16.md diff --git a/lyx16.md b/lyx16.md new file mode 100644 index 0000000..3a28f73 --- /dev/null +++ b/lyx16.md @@ -0,0 +1,27 @@ + +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); + } + } +} \ No newline at end of file