Your first die was a = rand() % 6 + 1 ?>.
Your second die was a = rand() % 6 + 1 ?>.