From fa4f2282f9fe8133f45a0ae4e9e7a8e235b3c615 Mon Sep 17 00:00:00 2001 From: Vlad24 Date: Fri, 27 Feb 2026 13:01:15 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BA=D1=80=D0=B8=D0=BF=D1=82=20=D1=81?= =?UTF-8?q?=20=D0=9D=D0=9E=D0=94=20=D0=B3=D0=BE=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GCD.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 GCD.sh diff --git a/GCD.sh b/GCD.sh new file mode 100755 index 0000000..02d30ff --- /dev/null +++ b/GCD.sh @@ -0,0 +1,9 @@ +#!/bin/bash +a=$1 +b=$2 +while [ $b -ne 0 ]; do + r=$((a % b)) + a=$b + b=$r +done +echo $a