+ 8
Why is 5^3 = 124 in the following code snippet and how do we correct the error?
int a=15%10; int b=pow(a,3); cout<<b;
5 Answers
+ 12
Declare b as float or double, pow() function returns double value.
+ 10
@Antony, same here! âș
+ 9
Thanks for your help :)
+ 4
or dont use pow
0
why are we getting wrong for 5 powers only when we use pow(5, )?