Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /sqrt <number>:
- trigger:
- set {_n} to number-argument
- set {_x} to {_n}
- set {_y} to 1
- set {_e} to 0.0001
- set {_z} to {_x}-{_y}
- while {_z} is bigger than {_e}:
- set {_x} to ({_x}+{_y})/2
- set {_y} to {_n}/{_x}
- set {_z} to {_x}-{_y}
- message "La racine carré de %{_n}% est : %{_x}%"
Advertisement
Add Comment
Please, Sign In to add comment