Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert Fractions to Decimal
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00476506
Message ID:
00476753
Vues:
28
>>Actually, the second half of the question is kind of intriguing.
>
>Definately. You'll notice I didn't even try to answer that part!

Me too!< g >

My initial reaction was along the lines of first finding out the number of digits to the right of the decimal point. That'll give us the denominator via 10 ^ n. Then it'd be a matter of finding the common factors. The problem would get easier if all the fractions had a value that could be reached via 2 ^ n in the denominator. From the look of John's problem, that may be the case, since it looks like some sort of measurement. I can't recall seeing a measurement that used a fraction that didn't.

Hey, John, are all the fraction a power of 2 in the denominator (1/2, 1/4, 1/8, etc.)?
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform