>>
|
No. 443
What doesn't work about your program?
The only thing that jumps out at me as problematic is that you are randomly choosing how to swap. You should swap to whichever door you didn't guess and wasn't revealed.
The do/while that you're using there (and for choosing which door to reveal) makes the code a little harder to understand at a glance, so I wouldn't use it where you don't have to. Plus, there's no need to repeat either of those steps, so you'll get a (probably meaningless) performance boost.
|