Flipping a coin!
Just a beginner! I've got a darts game between two players. I need to work out how many games player 1 wins and player 2 wins out of 1000 games if there is a coin flip and thereafter the loser starts.
if (p1 < p2)
wins = 1 ;
wins = 0 ;
This is my code for if p1 has less throws than p2 then they win. I just don't know how to make them flip for it!
well its just a 0 / 1 random number genertion isnt it
You can find out about random numbers by studying std::rand and std::srand.