#include <cstdlib>
...
if(rand()%2)a++;
else a--;
That’s not very hard to do. Its simple trick.
0
solved Radomly add or subract 1; [closed]
#include <cstdlib>
...
if(rand()%2)a++;
else a--;
That’s not very hard to do. Its simple trick.
0
solved Radomly add or subract 1; [closed]