Code:
int WINS = 0, LOSSES = 0, result;
Usually ALL_CAPS is reserved for constants -- it's just a convention, but a very widespread one. Make these lower case.
Code:
if (result == 0)
...
if (sum == 7 || sum == 11)
return 0; //0 is win
else if (sum == 2 || sum == 3 || sum == 11)
return 1;
Define constants called WIN and LOSE. Use them in place of magic numbers. Their value doesn't really matter, but 0 and 1 are fine.
Code:
printf("Play again? ");
play_again = getchar();
getchar(); //soak up \n
Not very robust. What if I accidentally type "yy\n". The first getchar reads a 'y', the second soaks up the other 'y', and there's a '\n' stuck in the buffer for next time. I prefer to read a line with fgets, strip the new line, then check for 'y' or 'n' (or their upper case counterparts). If you want to be really strict, you also check that they entered exactly 1 character. I would even say you should define a function called play again. Something like:
Code:
bool play_again()
{
do
print "play again (y|n) ?" // tells the user valid choices are y or n
fgets
clear the buffer, which should be a function on it's own
strip newline
} while not 'y', 'n', 'Y' or 'N'
return true if user entered 'y' or 'Y'; else return false
}
...
do {
// play game
} while (play_again());
This is not cool:
Code:
getchar();getchar();getchar();
I have to press 3 keys to exit your program, but you don't tell me. IMO, basic console programs should not do this even once. Just let the program end and go to the next command prompt.
Code:
int play_game(void) //return bool
If you wanted to return a boolean type, make it return bool. But you don't. Just because you only have two possible values doesn't mean it's automatically a boolean. Think about how you use this return value. Do you ever intend for it to be part of some logical expression like play_game() && (x == 13)? No. You simply want to convey win/loss. Thus, returning int is fine, but use the constants I mentioned.
Code:
first_roll = rand() % 7;
while (first_roll == 0) //if 0 shows up, roll again
first_roll = rand() % 7;
That's silly. Just get a random number in the range of [0,5] and add 1 to it: (rand() % 6) + 1.
That was a pretty superficial review, I can't compile/run it right now, so I might have missed something.