title: Guessing Game Program
body: <p>I've created a simple guessing game program. My problem is I'm not sure how to loop the program back to the beginning of the program once the user has guessed a wrong number. I want the program to continue asking the user for a number until he gets it right. Can someone help me?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main (void) {
      int value = 58;
      int guess;
  
      printf("Please enter a value: ");
      scanf("%i", &amp;guess);
  
      if (guess == value) {
          printf("Congratulations, you guessed the right value");
      }
      else if (guess &gt; value) {
          printf("That value is too high. Please guess again: ");
          scanf("%i", &amp;guess);
      }
      else if (guess &lt; value) {
          printf("That value is too low. Please guess again: ");
          scanf("%i", &amp;guess);
      }
  
      return 0;
  }
  </code></pre>