Ticker

6/recent/ticker-posts

program to store 9 number with constant values in 2 dimensional array that is 3x3 matrix and print in matrix form in c programming :code

 

#include<stdio.h>

void main(){

int i ,j;

int matrix[3][3]={100,200,300,200,150,50,350,500,600};

printf("the 9 elements of 3X3 matrix is :\n");

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

{

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

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

printf("\n");

}

}




Reactions

Post a Comment

0 Comments