# code to print 1 1 1 1 in 1st row,1 0 0 1 in 2nd row, 1 0 0 1 in 3rd row, 1 1 1 1 in 4th row

asked Jul 6, 2019

answered Jul 8, 2019 by (140 points)
print("1111/

1001/

1111")
answered Jul 10, 2019 by brahma reddy
#include<stdio.h>

int main()

{

int i, j;

for(i=1; i<=4; i=i++)

{

for(j=1; j<=4; j=j++)

{

if(j=4 || j=1|| i=1 || i=4)

printf("1");

else

printf("0")

}

printf("\n");

}

return o;

}
answered Jul 10, 2019 by (150 points)
edited Jul 11, 2019 by vijay
#include<stdio.h>

int main()

{

int i, j,r,c;

scanf("%d",&r);

scanf("%d",&c);

for(i=1; i<=r; i++)

{

for(j=1; j<=c; j++)

{

if(j==1||j==r||i==1||i==c)
{

printf("1");
}
else

printf("0");

}

printf("\n");

}
}
answered Jul 10, 2019 by anonymous
for i in range(1,4):
for j in range(1,4):
if i==1 or i==4 or j==1 or j==i:
print ('1');
else:
print('0')
answered Jul 12, 2019 by Abhinav
public class Main

{

public static void main(String[] args) {

int i,j;

for (i=0;i<4;i++)

{

for(j=0;j<4;j++)

{

if( j==0 | j==3 | i==0 | i== 3)

{

System.out.print("1 ");

}

else

{

System.out.print("0 ");

}

}

System.out.println("");

}

}

}
answered Jul 12, 2019 by (140 points)
#include <stdio.h>

int main()

{

int i,j;

i=1;

for(i==1,j<=1,j++);

printf("%d",i);

return 0:

}