Compare commits
1 Commits
feature_Sl
...
Feature
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e71ac2a79 |
14
NOK.sh
14
NOK.sh
@@ -1,14 +0,0 @@
|
|||||||
#!/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
|
|
||||||
8
file.sh
Executable file
8
file.sh
Executable 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
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
a=$1
|
|
||||||
b=$2
|
|
||||||
while [ $b -ne 0 ]; do
|
|
||||||
x=$((a % b))
|
|
||||||
a=$b
|
|
||||||
b=$x
|
|
||||||
done
|
|
||||||
echo $a
|
|
||||||
Reference in New Issue
Block a user