function PrintLower(str)
print(str:lower())
end
function MergeAndSort(array1, array2)
local array = {}
for _, elem in ipairs(array1) do
table.insert(array, elem)
end
猜咐稿
for _, elem in ipairs(array2) do
table.insert(array, elem)
end
table.sort(array)
for _, elem in ipairs(array) do
简亩 io.write(elem, ', ')
end
end
function PrintDigitsAndReverse(num)
local digits = math.ceil(math.log(num)/math.log(10))
print("The digit of " .. num .. " is " .. digits)
print("The reversed number is ")
while num >0 do
local lastDigit = num % 10
io.write(lastDigit)
num = (num - lastDigit) / 10
end
end
function bind(f,v)如型笑 return 渣含租羡function(...)
return f(...,v)
end
end
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)