Thursday, July 9, 2009

C programming?

anyone can help me to create this program in c?





input a 4x5 20 real numbers. determine the mean and median of 2nd column.

C programming?
void main()


{


int i,j,a[4][5];


int mean,sum=0;


for(i=0;i%26lt;4;i++)


for(j=0;j%26lt;5;j++)


scanf("%d",%26amp;a[i][j]);








for(i=0;i%26lt;4;i++)


sum+=a[i][1];





mean=sum/4; /*mean*/


}


similarly median also..





jj
Reply:You can do this on your own


just calculate the things that are required to fill in the formula of calculating mean and median.


No comments:

Post a Comment