Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculate 3 EZ Pay
Message
De
22/10/2008 22:08:56
 
 
À
22/10/2008 20:46:56
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01356419
Message ID:
01356462
Vues:
30
>>All,
>>
>>Given the user input being the numeric value between 249.99 and 999.94 with 2 decimal places and always ending in .99 I have to return a number that is evenly divisible by 3 with up to 2 decimals.
>>
>>Example:
>>
>>User enters 599.99 and I have to display that he needs to use 599.97.
>
>
>Your hypothesis makes no sense. 599.97 is not equially divisible by 3 ... 600 is , 597.00 is and 597.99 is but not what you've supplied. You may need to be a bit more specific in your question.

Now you're confusing me. Divisible by 3 with up to 2 decimals means that 199.99 * 3 = 599.97. No?

If that's how it works, then the problem seems pretty trivial. Divide by 3, drop any decimals beyond 2, and multiply by 3. Perhaps you're right though. If the problem is that trivial, then maybe that's not really what it's about.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform