「モジュール:数学」の版間の差分

編集の要約なし
(空白のページを作成しました)
タグ: モバイル編集 モバイルウェブ編集
 
編集の要約なし
1行目: 1行目:
local p = {}


function getLmc(num1, num2)
if type(num1) == number and type(num2) == number then
if num1 == 0 or num2 == 0 then
return 0
end
if num1 == num2 then
return num1
end
a, b = 1
while num1 ~= num2 do
if a*num1 > b*num2 then
b = b + 1
else
a = a + 1
end
end
return num1
else
return "'''関数 getLmc: 引数には数値のみを入力してください。'''"
end
end
return p
3,281

回編集