The Quiz

  1. Write a function to calculate the greatest common denominator of two positive integers using Euclid’s algorithm.

What to Do

The function should receive two integers and return an integer.Obviously you should test your function, so create a main program that asks the user for two values, calculates the gcd and displays that.

Al leer de que se trataba este algoritmo de Euclid’s gracias a la información proporcionada por Ken, no puede evitar pensar que con esto resolveríamos los problemas que tiene algunos con las fracciones jaja.

Pero en fin, aquí está el programa:

Quiz#6

And the link at GitHub

 

CC BY 4.0 Quiz#6 by andreatrejod is licensed under a Creative Commons Attribution 4.0 International License.