main.cs175 chars10 lines
Explanation:
LucasNumber
takes an integer n
and returns the nth Lucas Number.if
statements check for the base cases where n
is 0 or 1.n
is not 0 or 1, then the function calls itself recursively to calculate the nth Lucas Number.gistlibby LogSnag