|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmx.edu.ulsa.cib4132005.practica1.AlgoritmoEuclides
public class AlgoritmoEuclides
| Constructor Summary | |
|---|---|
AlgoritmoEuclides()
|
|
| Method Summary | |
|---|---|
static long |
maximoComunDivisor(long m,
long n)
Calcula el maximoComunDivisor de dos numeros m y n, segun el algoritmo de Euclides |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AlgoritmoEuclides()
| Method Detail |
|---|
public static long maximoComunDivisor(long m,
long n)
m - el entero mayorn - el entero menor
Para usar este metodo se debe realizar la siguiente prueba unitaria:
int mcd=AlgoritmoEuclides.maximoComunDivisor(532,112); //el valor de la variable mcd es 28
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||