Your Ad Here

Sunday, December 21, 2008

Two Dimentional array in C

/* C program to input and display a 2-d array*/

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

2 comments:

Anonymous said...

Can you make a two dimensional array and one dimensional array in c++...?

Lionel said...

Yes you can make .....

Your Ad Here