Bit Strings
Background:
Allow me to state the obvious:
sequences of 1s and 0s are rather common in computer science.
With that said, sometimes you want a particular sequence of
1s and 0s. For example, if we were looking for all sequences
of length 4 that contained exactly 1 pair of consecutive 1s,
we would have:
Input:
Each line of input will be an integer, N, such that 2 <= N <= 12.
Output:
For each line of input, your program should print out all the
bit strings of length N that have exactly 1 consecutive pairs of
1s. Strings should be ordered in ascending order according
to their decimal equivalents. For ordering purposes, the leftmost
bit will be considered the least significant bit.
Sample Input:
2
3
Sample Output:
11
011
110