#include <stdio.h>

int dice()
{
  return (rand()>>5)%6+1; /* the low bits of rand() are bad */
}

main()
{
  int d1, d2;
  int i;
  srand(time(0));

  for (i = 0; i < 30; i++) {
    d1 = dice(); d2 = dice();
    printf("d1 + d2 = %d, %s \n", d1 + d2, d1 == d2 ? "double" : "");
  }
}
