Coin Flipping Implementation in C++