3 ms·
So the strategy "always choose the other door" boils down to the following simulation, which kind of makes it obvious { int count = 0; int i;
by Taniwha 6y ago
So the strategy "always choose the other door" boils down to the following simulation, which kind of makes it obvious
{
int count = 0;
int i;
for (i = 0; i < 1000; i++) {
int choice1 = rand()%3;
int actual = rand()%3;
if (choice1 != actual)
count++;
}