Velocity Test: Greatest Common Divisor

Last modified by XWikiGuest on 2021/05/03 08:17

Task: Write a program that computes and prints the Greatest Common Divisor of two numbers, a and b, using Euclid's Algorithm. a and b will be given as parameter in the URL.

For example:

a=0, b=0 => 0
a=7, b=0 => 7
a=7, b=5 => 1
a=35, b=42 => 7
a=42, b=35 => 7
a=-42, b=35 => No negative number allowed

Edit code