SMath Logo

SMath

>

Example: EuclideanGCD

Euclidean algorithm (calculating the GCD)

Efficient method for computing the greatest common divisor (GCD), also known as the greatest common factor (GCF) or highest common factor (HCF). The algorithm is also called Euclid's algorithm. User fills in two numbers to find out the GCD. This is a simple Numeric example, that uses While Loop inside.

Andrey Ivashov

Create a new worksheet from this example