feat: добавлен скрипт НОД и интерактивный main (#1)

Co-authored-by: Morozov
Reviewed-on: #1
This commit is contained in:
2026-02-28 08:48:53 +03:00
parent 49aeb710f3
commit f4c21e017b
2 changed files with 30 additions and 0 deletions

17
script_NOD.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
if [ $# -ne 2 ]; then
echo "Использование: $0 число1 число2"
exit 1
fi
a=$1
b=$2
while [ "$b" -ne 0 ]; do
temp=$b
b=$((a % b))
a=$temp
done
echo "$a"