Hi.. i want modify my programme 2 dimensional which only calculate addition only in cloumn0. Currently my programme calculate all row and column but dont want that. Anyone please advice how i cant modify. Tq here is my code.
Code:
#include <stdio.h>
int main() {
int marks[4][4] ;
int j ;
int i;
int sum = 0;
int average= 0;
printf("Enter the marks of 4 students :- \n");
for ( j = 0; j < 4 ; j++ )
for(i=0; i<4; i++)
{
printf("Marks of student [%d] [%d] : ",j,i );
scanf("%d", &marks[j][i]);
}
for(j= 0;j<4;j++)
for(i=0; i<4; i++)
{
sum = sum+marks[j][i];}
average = sum/4;
printf("Sum Of Column1: %d\n", sum);
printf("Average Of Column1: %d\n", average);
return 0;
}