Monty Hall problem: Difference between revisions
Content added Content deleted
(→{{header|XPL0}}: The procedure Play replaced by a pure function.) |
m (→{{header|XPL0}}: Output statements together.) |
||
Line 5,180: | Line 5,180: | ||
[Format(2,1); |
[Format(2,1); |
||
⚫ | |||
NWins:= 0; |
NWins:= 0; |
||
for Game:= 0 to NGames-1 do |
for Game:= 0 to NGames-1 do |
||
if IsGameWon(false) then NWins:= NWins+1; |
if IsGameWon(false) then NWins:= NWins+1; |
||
⚫ | |||
RlOut(0, float(NWins)/float(NGames)*100.0); |
RlOut(0, float(NWins)/float(NGames)*100.0); |
||
Text(0, "% of games.^M^J"); |
Text(0, "% of games.^M^J"); |
||
⚫ | |||
NWins:= 0; |
NWins:= 0; |
||
for Game:= 0 to NGames-1 do |
for Game:= 0 to NGames-1 do |
||
if IsGameWon(true) then NWins:= NWins+1; |
if IsGameWon(true) then NWins:= NWins+1; |
||
⚫ | |||
RlOut(0, float(NWins)/float(NGames)*100.0); |
RlOut(0, float(NWins)/float(NGames)*100.0); |
||
Text(0, "% of games.^M^J"); |
Text(0, "% of games.^M^J"); |