#include #include #include using namespace std; int roll(){ return (rand()%6 + 1); } void main(){ int result[13]; srand(time(0)); int total = 0; for(int i = 0; i < 13; i++) result[i] = 0; for(i = 0; i < 36000000; i++){ total = 0; total += roll(); total += roll(); result[total]++; } for(i = 2; i < 13; i++) cout << i << " " << result[i] << endl; }