+ 4
Is there any other way
#include <iostream> #include<math.h> using namespace std; int main() { int x; pow(x,3)=8; cout<<x; return 0; }/*i have to find number which is powered by 3 is this correct way*/
5 Respuestas
+ 7
x = pow(8, 1.0/3);
Yeah, so basically, you raise the resulting number to the power of the reciprocal of the power.
+ 6
... Are you trying to find the cube root of 8?
+ 4
This is a longer way.
https://code.sololearn.com/cd9tL43Oh5T6/?ref=app
+ 3
I want the number which is about to power
if I know power
and result after powering that number
+ 3
Just a tip: ensure that you use a double/float type (e.g. by using decimal points) in the exponent when using fractional powers such as in cube roots like what Hatsy Rei did.