// july8ex2.cpp : Defines the entry point for the console application.
// random number generator -- build

#include "stdafx.h"
#include "stdlib.h"
#include "time.h"

int main(int argc, char* argv[])
{
	
	int  times, die1, die2, tot, snake_eyes=0;

    srand(time(NULL));

	for (times=1; times<= 100; times++) {

	    die1= rand() % 6 + 1;
		die2= rand() % 6 + 1;
		tot= die1 + die2;
		printf("You threw a %d and a %d for a total of %d\n", die1, die2, tot);
//		if (  (die1==1) && (die2==1)  )
		if (tot==2)
			snake_eyes++;

	} /*end times*/

	printf("You threw %d snake eye(s)\n", snake_eyes);

	return 0;
}