Computer for SEE and NEB

It is a complete SEE and NEB solution for computer science. It includes Computer Fundamentals, Database (SQL), Programming in C QBASIC, CSS, JavaScript, and PHP for beginners.

Breaking

Post Top Ad

Your Ad Spot

Saturday, September 10, 2022

Program to display 2D Array Elements in C programming

 Program to display  2D Array Elements in C programming


#include<stdio.h>

#include<conio.h>

main()

{

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

printf("enter the elements of 3x3 matrix\n");

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

  {

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

    {

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

    }

  }

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

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

     {

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

       {

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

       }

     printf("\n");

     }

getch();

}


Output:



You may also read:

No comments:

Post a Comment

Post Top Ad

Your Ad Spot

Pages