first exe
This commit is contained in:
13
script_LCM.sh
Executable file
13
script_LCM.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
a=$1
|
||||
b=$2
|
||||
x=$a
|
||||
y=$b
|
||||
while [ $y -ne 0 ]; do
|
||||
rem=$((x % y))
|
||||
x=$y
|
||||
y=$rem
|
||||
done
|
||||
g=$x
|
||||
l=$(( (a * b) / g ))
|
||||
echo $l
|
||||
Reference in New Issue
Block a user