Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tArgs = {...}
- num1 = tonumber(tArgs[2])
- num2 = tonumber(tArgs[3])
- if tArgs[1] == "add" or tArgs[1] == "a" then
- sum = num1 + num2
- print(sum)
- elseif tArgs[1] == "minus" or tArgs[1] == "m" or tArgs[1] == "subtract" or tArgs[1] == "s" then
- diff = num1 - num2
- print(diff)
- elseif tArgs[1] == "times" or tArgs[1] == "t" or tArgs[1] == "multiply" or tArgs[1] == "mu" then
- pro = num1 * num2
- print(pro)
- elseif tArgs[1] == "divide" or tArgs[1] == "div" then
- div = num1/num2
- print(div)
- end
Advertisement
Add Comment
Please, Sign In to add comment