No Scratch Image Available
The tutorial author has not uploaded a Scratch image yet.
Hello! This is a tutorial on how to calculate the GCD (greatest common divisor) of two numbers without using import math. I'm using the Euclidean algorithm—basic knowledge but powerful for competitive coding.
For starters, the GCD, or greatest common divisor of a and b is the greatest number that both a and b is divisible to. The idea of this algorithm is that GCD(a, b) = GCD(b, a % b). When b is 0, the GCD is a. So the the code is like this:
The tutorial author has not uploaded a Scratch image yet.