#C12657. Fibonacci Series Generator
Fibonacci Series Generator
Fibonacci Series Generator
This problem requires you to generate the Fibonacci sequence up to a given integer n. The Fibonacci sequence is defined as follows: $$F_0 = 0,\;F_1 = 1,$$ and for all $$n \ge 2$$, $$F_n = F_{n-1} + F_{n-2}.$$ Given an integer input n, you must output all Fibonacci numbers that do not exceed n in order. If n is zero or negative, output nothing.
inputFormat
The input consists of a single integer n provided via standard input.
outputFormat
Output the Fibonacci sequence up to n on a single line. The numbers should be separated by a single space. If there are no Fibonacci numbers to display (i.e. when n is zero or negative), output nothing.
## sample10
0 1 1 2 3 5 8