4 Commits

Author SHA1 Message Date
1772a3c645 . 2026-02-28 15:03:37 +03:00
ae88fcad92 Merge pull request 'Конечный файл' (#2) from Feature into main
Reviewed-on: #2
2026-02-28 14:44:30 +03:00
2e71ac2a79 Конечный файл 2026-02-28 14:41:31 +03:00
46deb29580 Merge pull request 'feature_Slava' (#1) from feature_Slava into main
Reviewed-on: #1
2026-02-27 16:56:44 +03:00
3 changed files with 10 additions and 3 deletions

6
NOK.sh
View File

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

6
file.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
nod=$(./naibolshiy_obchiy_delitel.sh $1 $2)
nok=$(./NOK.sh $1 $2)
echo 'НОК:' $nok
echo 'НОД:' $nod

View File

@@ -2,6 +2,7 @@
a=$1 a=$1
b=$2 b=$2
while [ $b -ne 0 ]; do while [ $b -ne 0 ]; do
x=$((a % b)) x=$((a % b))
a=$b a=$b