Implement a program to calculate the Fibonacci sequence up to a given number using iteration.
HardProblem Statement
Implement a program to calculate the Fibonacci sequence up to a given number using iteration.
Sample Input
int n = 10;
Sample Output
Fibonacci sequence: 0 1 1 2 3 5 8 13 21 34
Limits
Time: 2s · Memory: 256 MB