#include <stdio.h>
main()
{
    float shu[3][5],sum1[3]={0},sum2[5]={0},pjf1[3],pjf2[5];
    int a,b;
    for(a=0;a<3;a++)
    {
        for(b=0;b<5;b++)
        {
            scanf("%f",&shu[a][b]);//60 60 60 60 60 
            sum1[a]=sum1[a]+shu[a][b];//sum1[0]=300 sum1[1]=350 sum1[2]=400
            sum2[b]=sum2[b]+shu[a][b];//sum2[0]=60 sum2[1]=60 sum2[2]=60 sum2[3]=60
                                      //sum2[0]=130 sum2[1]=130 sum2[2]=130 sum2[3]=130
                                      //sum2[0]=210 sum2[1]=210 sum2[2]=210 sum2[3]=210
        
         } 
    }
    for(a=0;a<3;a++)
    {
    pjf1[a]=sum1[a]/5;
    printf("学生平均分%f\n",pjf1[a]) ;
    }
    for(a=0;a<5;a++)
    {
    pjf2[a]=sum2[a]/3;
    printf("每门课平均成绩%f\n",pjf2[a]);
}
    

 getchar();
 }

 

更多文章请关注《万象专栏》

本栏目由《康祺惠购APP》独家赞助