Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Christmas Math Fun
Message
De
10/12/1997 11:38:06
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00064933
Message ID:
00065019
Vues:
65
>>>>>Looks like the Summation of k for k=1 to n. Solution to this is
>>>>>
>>>>>( n * ( n + 1 ) ) / 2
>>>>
>>>>Er, not exactly. That gets you the number of items on the nth day. What we're seeking is the sum as described above, where each day is cumulative from previous days. Day 3, you get 6+3+1=10 items for example, all the items from days 1, 2 , and 3...(Like the twelve days of Xmas) :~)
>>>
>>>Bill's solution works. On day 3, n=3 so [3 * ( 3 + 1)] / 2 = 6 which is 3+2+1. Day 4, (4 * 5)/2 = 10, or 4+3+2+1 = 10.
>>
>>but total gifts for day 4 = 10 + 6 + 4 + 1
>
>summation (i = 1 to n) of (i squared + i)/2...

I usually tell people that computer programmers are not necessarily nerds. But after following this thread, and noting my enjoyment at its developments, I have come to the conclusion that I am most definitely a nerd. And sorry folks, but I think you are too. Ahh well. :-)
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform