Arrays in a craps game

Help. My brain has stopped working! I need to run this craps program 1000
times and at the end show its stats. Such as how many games are won/lost on the first roll, how many are won/lost on the second roll and so on up to the twentieth roll and then after the twentieth roll. I've worked out how many are won/lost on the first roll but don't know where to go from there?!
Heres what I've got so far

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define SIZE 21

enum Status { CONTINUE, WON, LOST);

int rollDice(void);

int main()
{

int sum;
int myPoint;
int game;
int wins[SIZE] = {0};
int loses[SIZE]= {0};

enum Staus gameStatus;
srand(time(NULL));

for(game = 1; game <= 1000; game++){

sum = rollDice();

switch (sum){

case 7:
case11:
gameStatus = WON;
wins[0]++;
break;

case 2:
case 3:
case 12:
gameStatus = LOST;

default:
gamestatus = CONTINUE;
myPoint = sum;
break;
}

while( gameStatus == CONTINUE){
sum = rollDice();

if( sum == myPoint){
gameStatus = WON;
}
else{
if( sum == 7){
gameStatus = LOST;
}
}
}
}
printf("%d games are won on the first roll\n", wins[0]);
printf("%d games are lost on the first roll\n", loses[0]);
return 0;
}

int rollDice(void)
{
int die1
int die2;
int workSum;

die1 = 1 + (rand() % 6);
die2 = 1 + (rand() % 6);
workSum = die1 + die2;

return workSum;
}

thanks for any help you can give.
Its ok now. Brain is working today and I've sorted it.
Topic archived. No new replies allowed.