Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- mon = peripheral.wrap("top")
- pi = 1.27
- local args = {...}
- if args[2] == "+" then
- print(args[1] + args[3])
- else if args[2] == "-" then
- print(args[1] - args[3])
- else if args[2] == "*" then
- print(args[1] * args[3])
- else if args[2] == "/" then
- print(args[1] / args[3])
- else if args[2] == "pi" then
- print(args[1] * pi)
- else if args[2] == "kw" then
- print(args[1] * args[1])
- else if args[1] == "help" then
- help()
- end
- end
- end
- end
- end
- end
- end
- function help()
- print("Standaard: <nummer> <action> <number>")
- print("PI: <nummer> <pi>")
- print("Kwadraad: <number> <kw>")
- end
- function pos()
- mon.setCursorPos(mon.getCursorPos() + 1, mon.getCursorPos())
- end
Advertisement
Add Comment
Please, Sign In to add comment