Procedure GCD(x, y) Protected r While y <> 0 r = x % y x = y y = r Wend ProcedureReturn y EndProcedure