From 73f3f4f64c941172dc75a03d00f9aa8fe75e43ba Mon Sep 17 00:00:00 2001 From: 24_MokanGV <24_MokanGV@iux.local> Date: Sat, 28 Feb 2026 14:24:01 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20nod.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nod.sh | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/nod.sh b/nod.sh index 746e7f6..f4c5633 100644 --- a/nod.sh +++ b/nod.sh @@ -20,16 +20,5 @@ gcd() { echo $a } -if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then - if [ $# -ne 2 ]; then - exit 1 - fi - - if ! [[ "$1" =~ ^[0-9]+$ ]] || ! [[ "$2" =~ ^[0-9]+$ ]]; then - echo "Ошибка: Аргументы должны быть целыми положительными числами" - exit 1 - fi - - result=$(gcd $1 $2) - echo "НОД($1, $2) = $result" -fi \ No newline at end of file +result=$(gcd $1 $2) +echo "НОД($1, $2) = $result"