C program to print box number pattern with 1 and 0

Write a C program to print the given box number pattern with 1’s and 0’s using loop. How to print box number pattern using one’s and zero’s using for loop in C programming. Logic to print box number pattern with 1’s as border and 0’s at center in C program.

Example

Input

Input rows: 5
Input columns: 5

Output

11111
10001
10001
10001
11111

Read more

C program to print number pattern with 1, 0 at alternate columns

Write a C program to print the given number pattern series of 1’s and 0’s at alternate columns using loop. How to print number pattern with one’s at even column and zero’s at odd column using for loop in C programming. Logic to print given number pattern of 1 and 0 at alternate columns.

Example

Input

Input rows: 5
Input columns: 5

Output

01010
01010
01010
01010
01010

Read more

C program to print number pattern with 1, 0 at alternate rows

Write a C program to print the given number pattern of 1’s and 0’s at alternate rows using loop. How to print square number pattern of one and zero with one at odd row and zero at even row using loop in C programming. Logic to print number pattern of 1 and 0 with alternate rows.

Example

Input

Input rows: 5
Input columns: 5

Output

11111
00000
11111
00000
11111

Read more

C program to print 0 or 1 square number pattern

Write a C program to print the given 0, 1 square number pattern using loop. C program to print binary number pattern of n rows and m columns using loop. How to print the square number patterns using for loop in C programming. Logic to print the square filled with 1 using for loop in C program.

Example

Input

Input rows: 5
Input columns: 5

Output

11111
11111
11111
11111
11111

Read more