注册 登录
编程论坛 C语言论坛

这两个程序怎么做???

祝你前程似锦 发布于 2020-10-16 13:41, 1197 次点击
只有本站会员才能查看附件,请 登录
3 回复
#2
林月儿2020-10-16 13:47
作业?
#3
祝你前程似锦2020-10-16 13:50
回复 2楼 林月儿
是的  刚自学C然后对线性表跟结构体不是很了解 所以感觉无从下手
#4
祝你前程似锦2020-10-16 14:39
#include "stdio.h"
void main()
{
    struct student
        {
        int xuehao;
        char name[20];
        float score1;
        float score2;
        float score3;
        float ave;
        };
        struct student stu[10];
        int i,j,k;
        printf("请输入学生数\n");
        scanf("%d",&k);
        printf("请输入学生姓名学号成绩");
        for(i=0;i<k;i++)
        scanf("%s %d %f %f %f",stu[i].name,&stu[i].xuehao,&stu[i].score1,&stu[i].score2,&stu[i].score3);
        for(j=0;j<k;j++)
        printf("%s %d %.0f %.0f %0.f %.2f\n ",stu[j].name,stu[j].xuehao,stu[j].score1,stu[j].score2,stu[j].score3,(stu[j].score1+stu[j].score2+stu[j].score3)/3);
        
}
我写到这了 但是后面的要查找数据跟删除数据怎么做啊
1