1 Commits

Author SHA1 Message Date
2e71ac2a79 Конечный файл 2026-02-28 14:41:31 +03:00
3 changed files with 8 additions and 25 deletions

14
NOK.sh
View File

@@ -1,14 +0,0 @@
#!/bin/bash
a=$1
clone_a=$a
b=$2
clone_b=$b
while [ $b -ne 0 ]; do
temp=$b
b=$((a % b))
a=$temp
done
c=$((clone_a * clone_b))
d=$((c / a))
echo $d

8
file.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
echo 'Введите число 1:'
echo 'Введите число 2:'
nod=$(./naibolshiy_obchiy_delitel.sh $1 $2)
nok=$(./NOK.sh $1 $2)
echo 'НОК:' $nok
echo 'НОД:' $nod

View File

@@ -1,11 +0,0 @@
#!/bin/bash
a=$1
b=$2
while [ $b -ne 0 ]; do
x=$((a % b))
a=$b
b=$x
done
echo $a