// switch_test.c - demonstration of the switch statement

// at the moment we don't care, how we would obtain a real
// keyboard input. We just assume, it's in the variable.
unsigned char keyboard_input_ = 'h';

main()
{
  switch(keyboard_input_)
  {
    case 'q':
      printf("user wants to quit\n");
      break;
    case 'p':
    case 'P':
      printf("user wants to print\n");
      break;
    case 'h':
      printf("user wants help\n");
      break;
    case 'c':
      printf("user wants the calculator\n");
      break;
    default:
      printf("unknown user input: %c\n",keyboard_input_);
  }
}