numbers - Xcode Using Exponents -


this simple question, variable "side" divided square of variable "curnum". currently, code looks like

side = inputnum/(curnum^2); 

however, gives me error "invalid operands binary ^" how can use exponents?

try

pow(curnum, 2)  

should work......


Comments

Popular posts from this blog

haskell - Using filter on an item in a list? -

c# - When does PreApplicationStartMethod actually get triggered to run? -

tomcat6 - Exception when stopping container for a with Spring + Quartz + Tomcat web application -