Module:DropsLineTest: Difference between revisions

From Roat Pkz
Jump to navigation Jump to search
No edit summary
No edit summary
Line 14: Line 14:


     return output
     return output
end
-- Test the script with an example input
local inputNumber = 100 -- Example input number
local outputNumbers = generateOutput(inputNumber)
for i, number in ipairs(outputNumbers) do
    print("Number " .. i .. ": " .. number)
end
end

Revision as of 17:06, 5 May 2024

Documentation for this module may be created at Module:DropsLineTest/doc

-- Define a function to generate output numbers based on the input
local function generateOutput(input)
    local output = {}

    -- Add the input number
    table.insert(output, input)

    -- Calculate and add percentages
    table.insert(output, input * 0.1) -- 10%
    table.insert(output, input * 0.2) -- 20%
    table.insert(output, input * 0.3) -- 30%
    table.insert(output, input * 0.4) -- 40%
    table.insert(output, input * 0.5) -- 50%

    return output
end