# include <stdio.h>
# include <stdlib.h>
# define M
# define N int getdate(int (*sp)[M]){
int i,j,x;
for(i=;i<N;i++,j=){
while(j<M){
x=rand()%;
if(x>=){
sp[i][j]=x;j++;
}
}
}
return ;
} int lineave(int s[][M],float a[]){
int i,j;
float ave = 0.0;
for(i=;i<N;i++,ave = 0.0){
for(j=;j<M;j++){
ave = ave +s[i][j];
}
a[i] = ave/M;
}
return ;
} int outdate(int sp[N][M],float a[]){
int i,j;
printf("Output the result :\n");
for(i=;i<N;i++){
for(j=;j<M;j++)
printf("%4d\t",sp[i][j]);
printf(" :%6.2f\n",a[i]);
}
printf("\n");
return ;
} int main(void){
int r[N][M] = {};
float ave[N];
getdate(r);
lineave(r,ave);
outdate(r,ave);
}