Gapplet

For positive integers a and b we compute the list [a, b, ...] in which the i-th entry is the remainder of division of the (i-2)-th by the (i-1)-th entry. The list ends when the term just computed is 0. The gcd of a and b is the one but last entry.

Input a 
</COMMENT>
Input b 
</COMMENT>
 
</COMMENT>
 
</COMMENT>