Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Christmas Math Fun
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00064933
Message ID:
00065049
Views:
39
>OK, Bruce, you said no looping, but you didn't say no recursion:
>
>FUNCTION Gifts
>
>LPARAMETER pnDays
>
>LOCAL lnresult
>lnresult = 0
>IF pnDays > 0
> lnresult = ((pnDays * (pnDays + 1 ) ) / 2) + Gifts(pnDays - 1)
>ENDIF
>RETURN lnresult
>ENDFUNC
>

Uh-oh! Well, Edward P. found the desired solution, but we'll have to grant you some credit for wily thinking and interesting technique. :~)
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform