06-02-2005, 12:37 AM
I have absolutly no clue how to do this. I have to write a program that will let you enter a number of minutes. Then it will for every minute increase the number of bacteria produced according to Fibonacci numbers. All I have is this mess:
Code:
DECLARE SUB fibo (time!, total!)
CLS
INPUT "Number of minutes. ", min
FOR time = 1 TO min
CALL fibo(time, total)
NEXT time
PRINT "The number of bacteia at the end of"; min; " minutes is"; total; "."
SUB fibo (time, total)
DIM f(1 TO time)
SELECT CASE time
CASE IS = 0
total = 0
CASE IS = 1
total = 1
CASE IS > 1
total = f(time - 1) + f(time - 2)
END SELECT
END SUB