123456789101112131415
int roll() { return ((rand()%6)+1); } int main() { int arr[30]; srand(time(0)); for(int i=0; i<30; i++) arr[i] = roll()+roll(); }