Problem Statement
Write a program that reads an integer N and prints an N x N grid where the columns alternate between 1 and 0.
DEMO-C-32 โข Programming in C
Write a program that reads an integer N and prints an N x N grid where the columns alternate between 1 and 0.
A single integer N (1 <= N <= 20).
An N x N grid of alternating 1s and 0s.
Submit runs every public testcase in this browser. Results and code never leave this device.
3
1 0 1 1 0 1 1 0 1
5
1 0 1 0 1 1 0 1 0 1 1 0 1 0 1 1 0 1 0 1 1 0 1 0 1
1
1
7
1 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 0 1
C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.
/workspace/question