c语言结构体如何算平均值,总成绩,最高成绩,最低成绩17364917833?_百度知...答:codetypedef struct { int score; } Student;创建结构体数组并初始化成绩:codeStudent students[10]; // 假设有10个学生 int scores[] = {17, 36, 49, 17, 83, 3, 3, 3}; // 假设成绩数组为 {17, 36, 49, 17, 83, 3, 3, 3} for (int i = 0; i < 8; i++) { studen...
C语言定义一个具有5个元素的结构体数组,并进行初始化。写两个函数:1...答:include <stdio.h>struct s{int num;char name[10];float score;};int main(void){struct s stu[5] = {{1,"xiaozhao",50.5},{ 2, "xiaoqian", 60.5 },{ 3, "xiaosun", 75.5 },{ 4, "xiaoli", 15.5 },{ 5, "xiaozhou", 15.5 }};float var = 0.0f; for (int i...