+ 1
Why this code doesn't work?
3 odpowiedzi
+ 2
its a commom casting problem with pow, take a look at the solution a gave in this code, It might help
https://code.sololearn.com/cvjK2RXzrA1Z/?ref=app
0
Thanks! The point of my question was also that if you use a gcc compiler for example, this problem doesn't exist... It happens only with the compiler of SoloLearn.
0
You can simply change p from int to double on line 6 and drop the cast to int on line 8