I am new to all this so I hope I'm posting this correctly. While
studing about arrays I came across a program that has code in it
that I don't recognize or understand. I wondered if it was old or why I have never seen it. The program will run on my complier but I don't understand why. I am trying to write a similiar program for homework and would like for someone to explain this co#include<stdio.h>
#include<conio.h>
main()
{
// clrscr();-----WHAT IS THIS?
int A[4][4]={1,2,3,4,0,3,5,7,2,4,6,8,9,8,7,6},row,I,J,column, trow,tcolumn,
dia,rdia,ckboard,reverse;
row=0;
trow=0;
for(J=0;J<=3;J++)
{
for(I=0;I<=3;I++)
{
printf("%2d",A[J][I]);--IS PRINTF THE SAME AS COUT?AND WHAT DOES %2D MEAN?
row=row+A[J][I];
}
printf("\n");
printf("Row=%d\n\n",row);
trow=trow+row;
row=0;
}
printf("Total of the row=%d\n\n",trow);
trow=0;
{
tcolumn=0;
column=0;
for(I=0;I<=3;I++)
{
for(J=0;J<=3;J++)
{
printf("%2d",A[I][J]);
column=column=column+A[I][J];
}
printf("\n");
printf("column=%d\n\n",column);
tcolumn=tcolumn+column;
column=0;
}
return 0;
}
}de to me. I don't have MSDN. Thanks for any help
JBLEA