#include <stdio.h>
#include <stdlib.h>
int roll_dice(void) {
}
int main(void) {
int sum, i;
int frequency[13] = {0};
for (i = 0; i < 100000; i++) {
int die1 = roll_dice();
int die2 = roll_dice();
sum = die1 + die2;
frequency[sum]++;
}
for (i = 2; i <= 12; i++) {
printf("%d\t%d\n", i
, frequency
[i
]); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCByb2xsX2RpY2Uodm9pZCkgewogICAgcmV0dXJuIChyYW5kKCkgJSA2KSArIDE7IAp9CgppbnQgbWFpbih2b2lkKSB7CiAgICBpbnQgc3VtLCBpOwogICAgaW50IGZyZXF1ZW5jeVsxM10gPSB7MH07IAoKICAgIGZvciAoaSA9IDA7IGkgPCAxMDAwMDA7IGkrKykgewogICAgICAgIGludCBkaWUxID0gcm9sbF9kaWNlKCk7CiAgICAgICAgaW50IGRpZTIgPSByb2xsX2RpY2UoKTsKICAgICAgICBzdW0gPSBkaWUxICsgZGllMjsKICAgICAgICBmcmVxdWVuY3lbc3VtXSsrOwogICAgfQoKICAgIHByaW50Zigi5ZKMXHTpoLvluqZcbiIpOwogICAgZm9yIChpID0gMjsgaSA8PSAxMjsgaSsrKSB7CiAgICAgICAgcHJpbnRmKCIlZFx0JWRcbiIsIGksIGZyZXF1ZW5jeVtpXSk7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0K