Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a39bc30

Browse files
committedAug 25, 2017
Chapter 03 section 07 codes updated.
1 parent 6134fe5 commit a39bc30

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎03-Probability-Simulation/07-Winning-the-Prize/src/WinningPrize.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ public void run(){
2525
if(play())
2626
wins ++;
2727

28-
System.out.println("winning rate:" + (double)wins/N);
28+
System.out.println("winning rate: " + (double)wins/N);
2929
}
3030

31-
public boolean play(){
31+
private boolean play(){
3232
for(int i = 0 ; i < playTime ; i ++)
3333
if(Math.random() < chance)
3434
return true;
40.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)
Please sign in to comment.