Write a program to create double dimension array of 2x3 matrix and display its elements
#include <stdio.h>
void main ()
{
int a[2][3],i,j;
clrscr ();
for (i=0;i<2;i++)
{
for (j=0;j<3;j++)
{
printf ("\nEnter element: ");
scanf ("%d",&a[i][j]);
}
}
for (i=0;i<2;i++)
{
for (j=0;j<3;j++)
{
printf ("%d\t",a[i][j]);
}
printf ("\n");
}
getch ();
}
Post a Comment