summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2022-11-07 18:12:33 +0200
committerIgor Pashev <pashev.igor@gmail.com>2022-11-07 18:12:33 +0200
commit53092ade72214d2ea75a8a38e10a317b41de7260 (patch)
treefc5e610750bed47d698da45f7b07b2ac9fc15179
parentf595946c3f7ebdb7d0cac5f96150c9a06edeb949 (diff)
downloadgcd-53092ade72214d2ea75a8a38e10a317b41de7260.tar.gz
Update Pascal
-rw-r--r--gcd.pas6
1 files changed, 5 insertions, 1 deletions
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.