+ 5
[SOLVED] Pow() function returns 0 in C++
When I try to "cout << pow((1/6), 1);" it prints '0'. I also tried setting precision and creating my own power function but it still returns 0.... Here is my code: https://code.sololearn.com/cA235a164a20 Thank you in advance!
3 Respostas
+ 8
You should write 1/6 as 1.0/6
+ 2
Thanks a tone mate!
- 1
yes yes i can do