Post Reply 
Fibonacci sequence by recursive algorithm fail
04-20-2015, 07:57 PM (This post was last modified: 04-20-2015 07:57 PM by Tim Wessman.)
Post: #2
RE: Fibonacci sequence by recursive algorithm fail
The CAS is case sensitive. There is no function or keyword called "Return"
Code:

#CAS
    fibo(n):=
    begin
        // versión 0.0.1 April 20
            if n≤1 then 
                    return n;
            else
                    return (fibo(n-1)+fibo(n-2));
            end
    end;
#end

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Fibonacci sequence by recursive algorithm fail - Tim Wessman - 04-20-2015 07:57 PM



User(s) browsing this thread: 1 Guest(s)