Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int wincount=0, totalcount=0;
- for (int i=1; i<=6; i++) {
- for (int j=1; j<=6; j++) {
- for (int k=1; k<=6; k++) {
- … // insert more loops here
- if (i+j+k+… >= 15) {
- wincount++;
- }
- totalcount++;
- }
- }
- }
- float probability = wincount/totalcount
Advertisement
Add Comment
Please, Sign In to add comment