RosettaCodeData/Task/Greatest-common-divisor/Pascal/greatest-common-divisor-4.pas
2023-07-01 13:44:08 -04:00

6 lines
327 B
ObjectPascal

Program GreatestCommonDivisorDemo(output);
begin
writeln ('GCD(', 49865, ', ', 69811, '): ', gcd_iterative(49865, 69811), ' (iterative)');
writeln ('GCD(', 49865, ', ', 69811, '): ', gcd_recursive(49865, 69811), ' (recursive)');
writeln ('GCD(', 49865, ', ', 69811, '): ', gcd_binary (49865, 69811), ' (binary)');
end.