title: Program is skipping fgets without allowing input
body: <p>Basically as the title says.. When my program is run from the console, it'll ask if you'd like to encrypt or decrypt.. and when I input e or E, it creates a new blank line (until I input some kind of text), then shows the "enter the text" and "enter the key" lines all at once..</p>
  
  <p>So, in the console it would look something like:</p>
  
  <p>Would you like to (E)ncrypt or (D)ecrypt? e</p>
  
  <p>asdf jkl; &lt;---- random user input to get the program to continue..</p>
  
  <p>Enter the text you would like to encrypt : Enter a key to use for encryption : (user input)</p>
  
  <p>and then the program exits..</p>
  
  <pre><code>//message to be encrypted
  char text[250]; 
  //word to use as the key
  char key[50];
  //stores the encrypted word
  char encrypted[250];
  
  char answer;
  printf("Would you like to (E)ncrypt or (D)ecrypt? ");
  scanf(" %c", &amp;answer);
  
  if(answer == 'e' || answer == 'E')
  {
      printf("Enter the text you want to encrypt : ");
      fgets(text, 250, stdin);
  
      printf("Enter a key to use for encryption : ");
      fgets(key, 50, stdin);
  
      printf("Encrypted text : ");
  
      //code that encrypts the text here      
  }
  </code></pre>
  
  <p>So the problem, then, is that it's skipping the fgets entirely and not waiting/allowing the user to input any answers.. why for?</p>