+ 1
STRANGE OUTPUT when using the POW function !!! (Sololearn code playground)
This problem happened on sololearn's code playground I tried to print the powers of 10 using the pow function But for some powers like 2,4,7,8,9 the output was the real answers -1 (99, 9999...) https://code.sololearn.com/cpgbKSC5QiqU/?ref=app Why does this happen?! any ideas?
2 odpowiedzi
+ 4
pow returns a double. Don't feed it with integers.
edit: k must be double. Forgot to add that.
0
Thanks, It works now, although what happened with the integer is still weird 😅