// randomly selects heads or tails #include #include #include using namespace std; int main() { srand(time(NULL)); // Pick a random 0 or 1 int r = rand() % (2); if (r == 0) { cout << "Heads" << endl; } else { cout << "Tails" << endl; } return 0; }