Apr 20, 2015 at 4:06pm
works fine on online compiler (cpp.sh)...
cpp.sh/4ntx
which compiler/ide are you using?
Last edited on Apr 20, 2015 at 4:08pm
Apr 20, 2015 at 4:40pm
it looks like its loosing 1 every two rounds, but once I gave it 1234567 it gave me back 1234566, so it lost 1, even though it had 7 rounds..
Last edited on Apr 20, 2015 at 4:41pm
Apr 20, 2015 at 5:07pm
The pow function returns a float, so there's probably a rounding error happening.
Apr 20, 2015 at 5:53pm
Makes sens fg109, I added 0.5 on the end of the equation and the precision is back on.