works fine on online compiler (cpp.sh)...
cpp.sh/4ntx
which compiler/ide are you using?
Last edited on
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
The pow function returns a float, so there's probably a rounding error happening.
Makes sens fg109, I added 0.5 on the end of the equation and the precision is back on.