main()
is an array args[]
.
So, you can use the expression args.length
to access its length.
false
.
false
with true
in the copy.
false
with true
and true
with false
in the copy.
false
with true
and true
with false
in the copy.
An alternative strategy is fill an array of length n one bit a time by applying the following remarkable propery:
\( \text{thue}[i] \; = \; \begin{cases} \; 0 & \text{if } i = 0 \\ \; \text{thue}[i \, / \, 2] & \text{if } i \text{ is even}\\ \end{cases}\)
\t
) characters
to separate the numbers in a row.
In Lecture 5, you'll learn about printf()
, which makes it easier to format
and align numeric output.
We recommend organzing your program accordingly.