3
Answers

Arithmatic Question

dadaooron

dadaooron

19y
2.5k
1
Hello I am new to programming and would like to do calculate y³ where 3 could be any number. Is the only way of doing this without writing y*y*y or is ther an operator I could use like y^3? Thank you for your help
Answers (3)
0
dadaooron
NA 3 0 19y
Thanks a lot, you have both saved me from writting some really stupid long fuctions!
0
WWWorm
NA 3 0 19y
Also you can do it with exponential function: Exp(3*Ln(y)) where 3 could be any number
0
alobiuc
NA 197 0 19y
Use the Math.Pow function like this: double x,power,result; x=5;//whatever value you want; power =3;//again, what power you desire result=Math.Pow(x,power); }