Monday, 23 February 2015

Two Dimensional Array Program in C


#include<stdio.h>
#include<conio.h>
main()
{
int i,j,a[3][3];
clrscr();
printf("\n Enter Array Values\n");
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
scanf("%d",&a[i][j]);
}
}
printf("\n Given Array Values\n");

for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
printf("\t%d",a[i][j]);
}
printf("\n");
}
getch();
}

No comments:

Post a Comment