Square_Root()
var/N1 = input("What number would you like to get the square root of?") as num
src << "Answer:[sqrt(N1)]"
return
When I try to square a negative number, it gives a runtime error, how can I fix this?
|
In response to The-Man-On-The-Moon
|
|
if(N1<=0)
src << "Pick a valid number aboive 0" |
Since you already have sin and cos functions, you can add tan easily by doing (cos(x)/sin(x)). Woot.
|
In response to Igmolicious
|
|
Igmolicious wrote:
Since you already have sin and cos functions, you can add tan easily by doing (cos(x)/sin(x)). Woot. For that, is x the same number? var/N1 = input("What number?") src << "Answer:[cos(N1)/sin(N1)]" |
Dodecohedron.