mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
298fcbbf70
gcd now passes :)
17 lines
318 B
ObjectPascal
17 lines
318 B
ObjectPascal
program example (input, output);
|
|
var x, y, g: integer;
|
|
procedure printf (format:string; ...) := #0;
|
|
function gcd (a, b: integer): integer;
|
|
var c: quaternion;
|
|
begin
|
|
if b = 0 then gcd := a
|
|
else gcd := gcd (b, a mod b)
|
|
end;
|
|
|
|
begin
|
|
x := 130;
|
|
y := 120;
|
|
g := gcd (x, y);
|
|
printf ("%d\n", g);
|
|
ExitCode := g <> 10;
|
|
end.
|