#include <stdio.h>

float win, draw, loss;
void match(short unsigned int a1,short unsigned int a2,short unsigned int d1,short unsigned int d2);

void main()
{
short unsigned int a1, a2, a3, d1, d2;

win = draw = loss = 0;

for (a1=1;a1<=6;a1++)
for (a2=1;a2<=6;a2++)
for (a3=1;a3<=6;a3++)
for (d1=1;d1<=6;d1++)
for (d2=1;d2<=6;d2++)
{
	//if ( a1 >= a3 && a2 >= a3 )
		match(a1,0,d1,0);
	//else if ( a1 >= a2 && a3 >= a2 )
	//	match(a1,a3,d1,d2);
	//else if ( a2 >= a1 && a3 >= a1 )
	//	match(a2,a3,d1,d2);
}

float total = win+draw+loss;

printf("Won: %f, Drew: %f, Lost: %f\n",win/total,draw/total,loss/total);
}

void match(short unsigned int a1,short unsigned int a2,short unsigned int d1,short unsigned int d2)
{
	if ( a2 > a1 ) match (a2, a1, d1, d2);
	else if ( d2 > d1 ) match (a1, a2, d2, d1);
	else
	{
		if ( d1 >= a1 && d2 >= a2 ) loss++;
		else if ( a1 > d1 && a2 > d2 ) win++;
		else draw++;
	}
}

