Write a program to print Fibonacci series up to N terms using loop.
Example
Input
Input number of terms: 10
Output
Fibonacci series:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34
Write a program to print Fibonacci series up to N terms using loop.
Example
Input
Input number of terms: 10
Output
Fibonacci series:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34
The input consists of n (0<n<100) lines.
Each line consists of the number of terms(ranges from 1 to 20).
The last line of input consists of Int(-1).
输入
3 10 -1
输出
0,1,1 0,1,1,2,3,5,8,13,21,34