Lang:G++
Edit12345678910111213141516171819202122232425262728293031//// main.cpp// Dice Possibility//// Created by Jiao Liu on 11/1/17.// Copyright © 2017 ChangHong. All rights reserved.//#include <iostream>#include <iomanip>using namespace std;float dice[105][605];float subPro(int i, int j){float sum = 0;for (int x = 1; x <= 6; x++) {if (j-x >= i-1 && j-x <= 6*(i-1)) {sum += dice[i-1][j-x]*dice[1][x];}}return sum;}int main(int argc, const char * argv[]) {for (int i = 1; i <= 6; i++) {dice[1][i] = 1.0/6;}for (int i = 2; i <= 100; i++) {for (int j = i; j <= 6*i; j++) {