Files
github/main.sh
2026-02-28 14:27:04 +03:00

19 lines
390 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
num1=$1
num2=$2
echo "Вычисление для чисел: $num1 и $num2"
echo "------------------------"
# Подключаем скрипты с функциями
source ./nod.sh
source ./nok.sh
# Вычисляем НОД
gcd=$(gcd $num1 $num2)
echo "НОД($num1, $num2) = $gcd"
# Вычисляем НОК
lcm=$(lcm $num1 $num2)
echo "НОК($num1, $num2) = $lcm"