check this logic:
#include< stdio.h >
#include< conio.h >
void main()
{
int a[10][10],r,c,i,j,n=4;
clrscr();
printf(enter the order of the matrix\n);
scanf(%d%d,&r,&c);
for(i=0;i < r;i++)
for(j=0;j < c;j++)
if(j==n)
{
a[i][j]=0
n=n-1;
}
else
a[i][j]=1;
for(i=0;i < r;i++)
{
for(j=0;j < c;j++)
printf(%d\t,&a[i][j]);
printf(\n);
}
}
ku_friend64 <[EMAIL PROTECTED]> wrote:
Hi,
Everyone,
please send me the logic of following output in c.
Take input of the dimension in 2D-Array,presents the following
output if user give the dimension 5
1 1 1 1 0
1 1 1 0 -1
1 1 0 -1 -1
1 0 -1 -1-1
0 -1 -1 -1 -1
[Non-text portions of this message have been removed]