Ticker

6/recent/ticker-posts

program to input data in 2 dimesional(2D) array for example 3x3 matrix and display in matrix form in c programming Source code

 #include<stdio.h>

void main(){

int i,j,a[3][3];

printf("enter the 3x3 matrix element : \n");

for(i=0;i<3;i++){

for(j=0;j<3;j++)

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

}

printf("\nthe 3x3 matrix elements are : \n");

for(i=0;i<3;i++){

for(j=0;j<3;j++)

printf("%d\t",a[i][j]);

printf("\n");

}

}










Reactions

Post a Comment

0 Comments