Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  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