4 Commits

Author SHA1 Message Date
63865e527f bang 2026-02-28 14:40:45 +03:00
7b0200c541 On branch first
Your branch is up to date with 'origin/first'.
 Changes to be committed:
	new file:   script_GCD.sh
2026-02-27 19:02:36 +03:00
946b345a58 On branch third
Your branch is up to date with 'origin/third'.

 Changes to be committed:
	new file:   main
	new file:   test.txt
2026-02-27 18:12:36 +03:00
091fa03552 On branch second
Changes to be committed:
	new file:   NOD
abooooba
2026-02-27 17:48:14 +03:00
4 changed files with 40 additions and 0 deletions

13
NOD Normal file
View File

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

13
main Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
echo "Введите первое число:"
read a
echo "Введите второе число:"
read b
gcd=$(./script_GCD.sh $a $b)
lcm=$(./script_LCM.sh $a $b)
echo "НОД = $gcd"
echo "НОК = $lcm"

13
script_GCD.sh Executable file
View File

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

1
test.txt Normal file
View File

@@ -0,0 +1 @@
hiiiii