Simple dice

Cybot--

In C, a case statement doesn't end just because it hits a new case. You have to insert a break at the end of each case.

case 1:
  do_something();
  break;
case 2:
  do_something_else();
  break;
...

Without the first break, case 1 calls both functions.

FWIW, I vote for AlphaBeta's technique of storing the 7-segment display data in arrays. It makes the code smaller, more easily modifiable, and easier to maintain.

Mikal