Q11.Select all snippets of code that print the following sequence of `n` lines, where `n` is a positive integer that is already defined. The ith line in the output corresponds to the first i Fibonacci numbers, for 1≤i≤n. Assume that 0 and 1 are the first two Fibonacci numbers. There should be a single space after every number, including after the last number in any given line.
Sample output for `n = 7`:
```
0
0 1
0 1 1
0 1 1 2
0 1 1 2 3
0 1 1 2 3 5
0 1 1 2 3 5 8
```
Save
Check
Details
Q11
16 Oct 2022
Q11.Select all snippets of code that print the following sequence of `n` lines, where `n` is a positive integer that is already defined. The ith line in the output corresponds to the first i Fibonacci numbers, for 1≤i≤n. Assume that 0 and 1 are the first two Fibonacci numbers. There should be a single space after every number, including after the last number in any given line.
Sample output for `n = 7`:
```
0
0 1
0 1 1
0 1 1 2
0 1 1 2 3
0 1 1 2 3 5
0 1 1 2 3 5 8
```