你在程序开头加上
#include <stdio.h>
#include <conio.h>
看看
嗯,你把代码复制上来哈
图片效果太差!1
==#include<stdio.h>
#include<conio.h>
#define N 5
#define M 6
main ()
{
float score[N][M]={0,0};
int i,j;
printf ("input%dstudents%dscore:\n",N-1,M-1);
for (i=0;i<N-1;i++)
for (j=0;j<M-1;j++) scanf ("%f",&score[i][j]);
for (i=0;i<N-1;i++)
for (j=0;j<M-1;j++)
score[i][M-1]=score[i][M-1]+score[i][j];
for (i=0;i<N-1;i++)
{ for (j=0;j<M-1;j++)
score[N-1][j]=score[N-1][j]+score[i][j];
score[N-1][j] =score[N-1][j]/(N-1);
}
printf ("student list of score\n");
for (i=0;i<N-1;i++)
{printf ("%6d\n",i+1);}
for (j=0;j<M;j++)
{
printf ("%7.1f",score[i][j]);
}
printf ("\n");
{printf ("average:\n");
}
for (j=0;j<M;j++)
{
printf ("%7.1f",score[N-1][j]);
}
}
[此贴子已经被作者于2007-2-7 9:50:22编辑过]
#include <stdio.h>
#include <conio.h>
#define N 5
#define M 6
main ()
{
float score[N][M]={0.0};
int i,j;
printf("input%dstudents%dscore:\n",N-1,M-1);
for (i=0;i<N-1;i++)
for (j=0;j<M-1;j++) scanf ("%f",&score[i][j]);
for (i=0;i<N-1;i++)
for (j=0;j<M-1;j++)
score[i][M-1]=score[i][M-1]+score[i][j];
for (i=0;i<N-1;i++)
for (j=0;j<M-1;j++){
score[N-1][j]=score[N-1][j]+score[i][j];
score[N-1][j]=score[N-1][j]/(N-1);}
printf("student list of score\n");
for (i=0;i<N-1;i++)
{printf ("%6d\n",i+1);}
for (j=0;j<M;j++)
{printf("%7.1f",score[i][j]);}
printf("\n");
printf("average:\n");
for (j=0;j<M;j++)
{printf("%7.1f",score[N-1][j]);
printf("\n");}
}
我也改好来,就两字,郁闷
全是语法错误
不是少一个括号},就是少一个字母,如printf写成print
楼主不要用上面这种格式写代码,以后细心点
.....
[此贴子已经被作者于2007-2-7 10:08:09编辑过]