title: switch statement convert number to words
body: <p>I'm learning switch statements, I understand the logic and all but my program will nut print the second switch statement. It is reading &amp;digit1 but i dont think its reading &amp;digit2 for the second switch. I've already looked at other posts but I can't find anything to help me, atleast that I can grasp lol. I am not getting any errors but cannot understand why its printing switch (digit1) and not switch(digit2) Thanks for any assistance.
  Here is my code as of now. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int main (void)
  {int digit1;//user's first number
  //digit1 = number/10
  int digit2;
  //digit2 = number%10
  int number;;//users second number
  
  printf("Enter a two digit number less than 100:\n");
  scanf("%d", &amp;digit1, &amp;digit2);
  
  switch(digit1)
  {
  case 0:
      printf("zero");
      break;
  case 1:
      printf("one");
      break;
  case 2:
      printf("two\n");
      break;
  case 3:
      printf("three");
      break;
  case 4:
      printf("four");
      break;
  case 5:
      printf("five");
      break;
  case 6:
      printf("six");
      break;
  case 7:
      printf("seven");
  case 8:
      printf("eight");
      break;
  case 9:
      printf("nine");
      break;
  
  switch (digit2)
  {
  case 0:
      printf("zero");
      break;
  case 1:
      printf("one");
      break;
  case 2:
      printf("two\n");
      break;
  case 3:
      printf("three");
      break;
  case 4:
      printf("four");
      break;
  case 5:
      printf("five");
      break;
  case 6:
      printf("six");
      break;
  case 7:
      printf("seven");
  case 8:
      printf("eight");
      break;
  case 9:
      printf("nine");
      break;
  default:
      printf("\nYou must enter a valid number");
      break;
  }
  }
  }
  </code></pre>