From fa4f2282f9fe8133f45a0ae4e9e7a8e235b3c615 Mon Sep 17 00:00:00 2001 From: Vlad24 Date: Fri, 27 Feb 2026 13:01:15 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=A1=D0=BA=D1=80=D0=B8=D0=BF=D1=82=20?= =?UTF-8?q?=D1=81=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 -- 2.49.0 From 09681e436da091867d1100e6067c6c5c3b4e8ed1 Mon Sep 17 00:00:00 2001 From: Vlad24 Date: Fri, 27 Feb 2026 13:39:22 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20main-=D1=81=D0=BA=D1=80=D0=B8=D0=BF=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 main.sh diff --git a/main.sh b/main.sh new file mode 100755 index 0000000..b91a416 --- /dev/null +++ b/main.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +echo "Введите 1е число:" +read num1 + +echo "Введите 2е число:" +read num2 + +echo "Мой результат:" +echo -n "НОД ($num1, $num2) = " +./GCD.sh $num1 $num2 -- 2.49.0