0

Is there any way of doing Cube root in C++??

Cube root of any number...May or may not be fractional cube root..

25th Jan 2019, 3:08 PM
PiXeL99
PiXeL99 - avatar
6 Réponses
+ 1
pow(num, 1/3)
25th Jan 2019, 3:27 PM
Vaas
Vaas - avatar
+ 1
I guess because of integer arithmetic 1/3 = 0 Try 1/3.0
25th Jan 2019, 3:38 PM
Vaas
Vaas - avatar
+ 1
Prince Jhawar pow() is the power function in the math.h library. The parameters are pow(base, exponent). It raises 'base' to the 'exponent' power.
23rd Sep 2020, 2:14 PM
Brian
Brian - avatar
0
I tried...pow(27,(1/3))...its giving 1..dont know why??!!
25th Jan 2019, 3:35 PM
PiXeL99
PiXeL99 - avatar
0
Yeah now it gives ri8...thanks bro!!👍👍
25th Jan 2019, 3:41 PM
PiXeL99
PiXeL99 - avatar
0
What is meaning of pow
23rd Sep 2020, 9:25 AM
Prince Jhawar
Prince Jhawar - avatar