| 
					 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39  | 
						// 1x25: Calcula el máximo como un divisor de dos números. // info: http://es.wikipedia.org/wiki/Algoritmo_de_Euclides #include <stdio.h> // Función que calcula el Máximo Común Divisor: int mcd( int numA, int numB ){ 	// Precondición: Se han de recibir dos parámetros de tipo entero. 	// Poscondición: Se devolverá un parámetro de tipo entero. 	int x; 	while( numB!=0 ){ 		x = numA; 		numA = numB; 		numB = x%numB; 	}; 	return numA; }; main(){ 	system("clear"); 	int numeroA, numeroB; 	printf("Dados dos numeros se calculara su maximo como un divisor: \n   Primer numero: "); 	scanf( "%i", &numeroA ); 	printf("   Segundo numero: "); 	scanf( "%i", &numeroB ); 	printf( "\n   El %i y %i tienen como M.C.D.: %i\n\n", numeroA, numeroB,  mcd(numeroA,numeroB) ); };  |