#include <stdio.h>
int main() {
int renshu = 4;
int cj[renshu];
int i = 0;
int zd, zx, he;
while (i < renshu) {
printf("请输入第%d个成绩", i + 1);
scanf("%d", &cj[i]);
i++;
}
zd = 0;
zx = cj[1];
he = 0;
for (i = 0; i < renshu; i++) {
if (cj[i] > zd) {
zd = cj[i];
}
if (cj[i] < zx) {
zx = cj[i];
}
he += cj[i];
}
i = 0;
do {
printf("%d\t", cj[i]);
i++;
} while (i < renshu);
printf("最大是%d,最小是%d,总分是%d,平均分是%f", zd, zx, he, ((float)he / renshu));
}