Guest User

Untitled

a guest
Jan 20th, 2016
95,656
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. int wincount=0, totalcount=0;
  2. for (int i=1; i<=6; i++) {
  3. for (int j=1; j<=6; j++) {
  4. for (int k=1; k<=6; k++) {
  5. … // insert more loops here
  6. if (i+j+k+… >= 15) {
  7. wincount++;
  8. }
  9. totalcount++;
  10. }
  11. }
  12. }
  13. float probability = wincount/totalcount
Advertisement
Add Comment
Please, Sign In to add comment