3 Commits

Author SHA1 Message Date
1bc79f47a3 Чета сделал 2026-02-27 17:05:40 +03:00
c201b4942e сделал НОДO 2026-02-27 16:31:57 +03:00
7f73789e3e Рабочий файл: НОК 2026-02-27 12:50:17 +03:00
2 changed files with 24 additions and 0 deletions

14
NOK.sh Executable file
View File

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

10
naibolshiy_obchiy_delitel.sh Executable file
View File

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