Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking for a simple math formula
Message
De
26/07/2002 12:26:40
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00683042
Message ID:
00683055
Vues:
28
>Does anyone know a simple formuala to do the following:
>
>1 = 1
>2 = 3 (1+2)
>3 = 6 (1+2+3)
>4 = 10 (1+2+3+4)
>5 = 15 (1+2+3+4+5)
>.
>.
>.
>
>
>So if given the number 5, the formula would return the total addition, 15. Thanks in advance for any ideas.
>
>Mat

From 1 to lnEnd (Gauss ?):
(lnEnd * (lnEnd+1)) / 2
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform