From 53092ade72214d2ea75a8a38e10a317b41de7260 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Mon, 7 Nov 2022 18:12:33 +0200 Subject: Update Pascal --- gcd.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcd.pas b/gcd.pas index 4253807..2461ee8 100644 --- a/gcd.pas +++ b/gcd.pas @@ -1,6 +1,6 @@ { FreePascal: https://www.freepascal.org/ -Tested with FreePascal 2.4.0, 3.0.0 +Tested with FreePascal 3.2 Usage: @@ -39,8 +39,12 @@ Var n: array Of integer; i: integer; Begin + If ParamCount = 0 then exit; + SetLength(n, ParamCount); + For i := 1 To ParamCount Do n[i-1] := StrToInt(ParamStr(i)); + Writeln(gcdn(n)) End. -- cgit v1.2.3