Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.redirect(term.native())
- itemX, itemY = term.getCursorPos()
- pi = 3
- a = 2
- b = 3
- c = 4
- function addThem(number)
- a = a + number
- b = b + number
- c = c + number
- end
- while true do
- pi = pi + 4/(a*b*c)
- addThem(2)
- pi = pi - 4/(a*b*c)
- addThem(2)
- term.setCursorPos(itemX,itemY)
- write(pi)
- if a % 4 == 0 then sleep(0) end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement