Code:

#include <stdio.h>
#include <math.h>
void scan_b(double b[30][30] , int , int );
void print_b(double b[30][30] , int , int );
void norm_b(double b[30][30], int , int );
double std_b(double b[30][30], int , int );
double avg_b(double b[30][30], int , int );
int main()
{
int k,l;
double c[30][30];
printf("please enter the number of rows and columns\n");
scanf("%d%d" , &k, &l);
scan_b(c ,k,l);
print_b (c,k,l);
norm_b( c , k, l);
printf ("the Standard deviation is: %lf\n" ,std_b( c , k, l));
printf ("the mean value is: %lf\n" ,avg_b( c , k, l));
system ("PAUSE");
return 0;
}
void scan_b(double b[30][30] , int i, int j)
{
int m,n;
printf("please enter a %d*%d array\n",i,j);
for (m=0 ; m<i ; m++)
for (n=0 ; n<j ; n++)
scanf("%d" , &(b[m][n]));
}
void print_b(double b[30][30] , int i, int j)
{
int m,n;
for (m=0 ; m<i ; m++)
{
printf("\n");
for (n=0 ; n<j ; n++)
printf("%d" , b[m][n]);
}
printf("\n");
}
void norm_b(double b[30][30] , int i, int j)
{
double sum=0,avg, avg2;
int m,n;
for (m=0 ; m<i ; m++)
for (n=0 ; n<j ; n++)
sum+=(b[m][n]);
printf("sum=%lf",sum);
avg=sum/(i*j);
printf("avg=%lf",avg);
for (m=0 ; m<i ; m++)
for (n=0 ; n<j ; n++)
b[m][n]=b[m][n]-avg;
for (m=0 ; m<i ; m++)
{
printf("\n");
for (n=0 ; n<j ; n++)
printf("%d" , b[m][n]);
}
printf("\n");
for (m=0 ; m<i ; m++)
for (n=0 ; n<j ; n++)
sum+=pow(b[m][n],2);
printf("sum2=%lf",sum);
avg2=sum/(i*j);
printf("avg2=%lf",avg);
for (m=0 ; m<i ; m++)
for (n=0 ; n<j ; n++)
b[m][n]=b[m][n]/sqrt(avg2);
for (m=0 ; m<i ; m++)
{
printf("\n");
for (n=0 ; n<j ; n++)
printf("%d" , b[m][n]);
}
printf("\n");
}
double avg_b(double b[30][30], int i, int j)
{
double sum=0,avg, avg2;
int m,n;
for (m=0 ; m<i ; m++)
for (n=0 ; n<j ; n++)
sum+=b[m][n];
avg=sum/(i*j);
return avg;
}
double std_b(double b[30][30] , int i, int j)
{
double sum2,sum,std,avg;
int m,n;
for (m=0 ; m<i ; m++)
for (n=0 ; n<j ; n++)
sum+=b[m][n];
avg=sum/(i*j);
for (m=0 ; m<i ; m++)
for (n=0 ; n<j ; n++)
sum2=pow((b[m][n]-avg),2);
std=sqrt(sum2/(i*j));
return std;
}