title: the loop in magic 8 ball has a bug
body: <p>I'm trying to make a Magic 8 Ball program but my loop has a bug.</p>
  
  <ol>
  <li><p>If you play again, the loop messes up and behaves like you were hitting enter all the time for about three cycles until it will work again. </p></li>
  <li><p>Also, there is a delay when you enter you question. You have to hit enter twice to get the answer.</p></li>
  </ol>
  
  
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;time.h&gt;
  #include &lt;conio.h&gt;
  void ans(int x);
  int main()
  {
      system("color 0A");
      srand(time(0));
      int num,i;
  
      do{
  
      char question[100] = {" "};
  
      num = rand()%10;
  
      puts("MAGIC 8 BALL!");
      puts("Press Enter When Ready.");
      getch();
      system("cls");
      puts("Input Yes or No questions only!");
      printf("\n");
      scanf("%s",&amp;question);
      getch();
      printf("\nTHE ANSWER | ");
      ans(num);
      getch();
      system("cls");
      printf("Press any key to try again.\nPress [x] to Exit.");
  
      if(getch()=='x'){
          system("cls");
          break;
      }
      system("cls");
      }while(1);
  }
  void ans(int x){
      switch(x){
          case 1 : printf("YES!");break;
          case 2 : printf("NO!");break;
          case 3 : printf("It's a thumbs down.");break;
          case 4 : printf("Positive!");break;
          case 5 : printf("As I see it Yes.");break;
          case 6 : printf("Certainly!");break;
          case 7 : printf("Negative!");break;
          case 8 : printf("Don't Count on it.");break;
          case 9 : printf("You don't want to know, trust me.");break;
          case 10: printf("I can't say right now.");break;
          default : printf("Cannot be determined right now");break;
      }
  }
  </code></pre>