This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package exemplos; | |
| import java.util.Random; | |
| public class MontyHall { | |
| // Dadas duas portas, escolhe aquela que restou. | |
| // Exemplos: | |
| // se forem dadas as portas 0 e 1, retorna 2 | |
| // se forem dadas as portas 0 e 2, retorna 1 | |
| // se forem dadas duas portas iguais (0 e 0, por ex.) retorna a primeira livre, |