title: Make the program stop after user enters a value
body: <p>I am building a quiz project on C. My question is, can I use a command or use something to make the user decide if he wants to keep answering questions or not. For example here is a part of my code. And i would like to make user able to press "0" and the program stops whenever user press that button or type it. I was thinking to make with with loop but I was wondering if there is anyway to make user press a button or type something to end it, whenever he wants. Thansk for your time and sorry for my english and for the confusion.</p>
  
  <pre><code>#include &lt;stdio.h&gt; 
  
  
  
  int main()
  {
  int a, ep;
  int score;
  score = 0;
  
  printf("Choose one\n");
  printf(" 1. Athletics\t 2. History\t\n 3. Internet\t 4. Greek Mythologyn\n");
  printf("Pick: ");
  scanf("%d",&amp;ep);
  
  if (ep==1) {
  printf("\n");
  printf("1. Ποιος διεθνής Έλληνας σκόραρε πάνω από ένα γκολ στο Μουντιάλ 2014;\n");
  printf("  1. Παπασταθόπουλος\n  2. Σάμαρης\n  3. Σαμαράς\n  4. Κανένας\n");
  
  printf("Answer: " );
  scanf("%d",&amp;a);
  
  if (a==4) {
  printf("Correct!!!\n");
  score = score +1;
  }
  else {
  printf("Wrong\n");
  score = score -1;
  }
  printf("Your score is: %d\n\n\n",score);
  
  printf("2. Ποιος κέρδισε τον δεύτερο απο τους πέντε τελικούς της σειράς για την Α1 τη\nσεζόν 2013-14;\n");
  printf("  1. Ολυμπιακός\n  2. Παναθηναϊκός\n");
  printf("Answer: " );
  scanf("%d",&amp;a);
  if (a==1) {
  printf("Correct!!!\n");
  score = score +1;
  }
  else {
  printf("Wrong\n");
  score = score -1;
  }
  printf("Your score is: %d\n\n\n",score);
  </code></pre>