title: How to make the program loop until user input specific number
body: <p>Basically, i need to write a program where the program ask the user to input specific number to get specific shapes. Like 1 for oval, 2 for rectangle and so on, the program needed to keep asking the user to input the numbers until the user enter  number 9 to end the program.
  This the final working code in Turbo C</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;conio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main ()
  {
  clrscr();
   int x=0;
  
   while(x != 9)
   {
   printf ("Enter 1,2,3 and 4 for differeten shape and 9 to exit: ");
   scanf ("%d",&amp;x);
  
   if (x == 1)
   {
       printf ( "*********\n"
     "*       *\n"
     "*       *\n"
     "*       *\n"
     "*       *\n"
     "*       *\n"
     "*       *\n"
     "*       *\n"
     "*********\n");
   }
  
   else if (x == 2)
   {
       printf ("   ***   \n"
     " *     * \n"
     "*       *\n"
     "*       *\n"
     "*       *\n"
     "*       *\n"
     "*       *\n"
     " *     * \n"
     "   ***   \n");
   }
   else if (x ==3)
    { printf( "    *    \n"
    "   ***   \n"
     "  *****  \n"
     "    *    \n"
     "    *    \n"
     "    *    \n"
     "    *    \n"
     "    *    \n"
     "    *    \n");
     }
     else if (x==4)
     {printf ("    *    \n"
     "   * *    \n"
     "  *   *   \n"
     " *     *  \n"
     "*       * \n"
     " *     *  \n"
     "  *   *   \n"
     "   * *    \n"
     "    *    \n");}
  
  }
  printf("The end\n");
  system("pause");
  return 0;
  }
  </code></pre>