Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculate number
Message
De
15/01/2005 12:41:16
 
 
À
15/01/2005 12:24:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00977470
Message ID:
00977471
Vues:
31
>hi all,
>i want to make operations at my number as..
>
>1. if mynumber lessthan or equal 2000
> mynumber=munumber*0.05
> endif
>*****************************
>but if mynumber as 30000 or lessthan(mean morethan2000) or morethan i want to make
>1. 2000*0.05 mean 100
>2. 4000*0.10 mean 400
>3. 8000*0.20 mean 1600
>4. 1600*0.25 mean 4000
> ****
>the result is 6100
>
>i need to make the 4 operatins if my number >2000,
>but if mynumber just need 2 operatins give the result,
>and get anothe number...
if  nMynumber =< 2000
    nMynumber      = nMunumber * 0.05
else
    if  nMynumber =< 3000
        n1          = 2000*0.05 && mean 100
        n2          = 4000*0.10 && mean 400
        n3          = 8000*0.20 && mean 1600
        n4          = 1600*0.25 && mean 4000
        nMynumber   = n1 + n2 + n3 + n4
    else
        * your number is greaterthan 30000
    endif
endif
HTH

Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform