CALCULATRICE DE PGCD (PLUS GRAND COMMUN DIVISEUR)

Taranael Messages postés 54 Date d'inscription dimanche 27 février 2005 Statut Membre Dernière intervention 21 juin 2007 - 6 juin 2006 à 08:32
amine_alaoui2000 Messages postés 1 Date d'inscription mercredi 17 mai 2006 Statut Membre Dernière intervention 6 juin 2006 - 6 juin 2006 à 14:18
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.

https://codes-sources.commentcamarche.net/source/37979-calculatrice-de-pgcd-plus-grand-commun-diviseur

amine_alaoui2000 Messages postés 1 Date d'inscription mercredi 17 mai 2006 Statut Membre Dernière intervention 6 juin 2006
6 juin 2006 à 14:18
Oui, c'est tout à fait possible d'utiliser la classe java.math.BigInteger
Merci pour la remarque!
Taranael Messages postés 54 Date d'inscription dimanche 27 février 2005 Statut Membre Dernière intervention 21 juin 2007 1
6 juin 2006 à 08:32
jLabelResultat.setText ( ((new BigInteger(chainePremierNombre)).gcd((new BigInteger(chaineDeuxiemeNombre)))).toString() );

Tu peux aussi utiliser ça :) (java.math.BigInteger)
Rejoignez-nous