We’re approaching to the end of the course!! And I am finishing up my WSQ tasks. In this post I’m presenting you, my dear reader, the GDCC3000.
The GDCC3000 is a code I wrote to calculate the greatest common divisor of two number. I used Euclid’s algorithm. This guy was smart because by using his method you can easely calculate the GCD of any two given numbers. This time I’m proud to say that I only watch one Youtube video to understand the algorithm.
Here it is:
From this video I managed to create my code which is not perfect because it keeps showing a cero at the end an I don’t know why. Besides that, the algorithm is pretty simple, but it has it’s little tricks.
Here is my github link to the code:
https://github.com/OctavioIRG/TC1017/blob/master/WSQ-s/GDC3000.cpp
Take care and expect soon another post, I’m already working on WSQ13!
Bye.
WSQ 12 by Octavio Rojas is licensed under a Creative Commons Attribution 4.0 International License.