user
Develop an algorithm to print the Fibonacci series up to a given number.

Given a number n=15


assistant
The algorithm should start with two initial numbers, 0 and 1, and then it should keep adding the two previous numbers until the current number (sum of the two previous numbers) is greater than the given number n. In this case, the desired output should be 0, 1, 1, 2, 3, 5, 8, 13.