Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need Math Whiz - Frankenbach ?
Message
De
15/02/2005 22:39:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
15/02/2005 22:36:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00987308
Message ID:
00987315
Vues:
27
>int(10/3) gives you the first three parts, i.e., 3.
>
>10 % 3 - or the equivalent, mod(10, 3), gives you the remainder.
>
>Or, using your variables:
>
>All numbers but the last are equal to int (v / (n-1))
>
>The last number is v % (n-1)

Alternatively, you could calculate the remainder by subtracting the sum of the first (n-1) numbers, from the original number.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform