#C314. Fibonacci Sequence Generator
Fibonacci Sequence Generator
Fibonacci Sequence Generator
Given a single integer n, implement a program that generates the first n terms of the Fibonacci Sequence. Recall that the Fibonacci sequence is defined as:
\(F_0 = 0\), \(F_1 = 1\) and for \(n \geq 2\), \(F_{n} = F_{n-1} + F_{n-2}\).
If n is less than or equal to zero, the program should output nothing.
Your solution should read input from STDIN and output the sequence to STDOUT. The numbers must be output on one line separated by a single space.
inputFormat
The input consists of a single integer n (n can be 0 or a positive integer) representing the number of terms in the Fibonacci sequence.
outputFormat
Output the first n terms of the Fibonacci sequence on a single line, with each number separated by a single space. If n is 0, output nothing.## sample
5
0 1 1 2 3