title: Conditional Statement for Random Number Generator in a range (in c)
body: <p>What i am trying to accomplish is that:</p>
  
  <p>User has 3 tries.</p>
  
  <p>Please guess the number.(wrong)</p>
  
  <p>You guessed wrong.</p>
  
  <p>Your number is too (high or low).</p>
  
  <p>You have 2 tr(ies) left.
  (user guesses wrong)</p>
  
  <p>You guessed wrong.</p>
  
  <p>Your number is too (high or low).</p>
  
  <p>You have 1 tr(y) left.</p>
  
  <p>As above. I'm trying to change the letters after "tr" if the user has left more
   than 1 its "ies" and "y" for one.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;time.h&gt;
  
  int main()
  {
      int num, guess, tries = 0;
      srand(time(0)); /* seed random number generator */
      num = rand() % 20 + 0; /* random number between 1 and 100 */
      int max_guess=3;
      printf("Guess My Number Game\n\n");
  
      do
      {
          printf("Enter a guess between 0 and 20 : ");
          scanf("%d", &amp;guess);
          tries++;
  
          if (guess &gt; num)
          {
              printf("Too high!");
              printf("You have %d tries left.\n\n",max_guess--);
          }
          else if (guess &lt; num)
          {
              printf("Too low!");
              printf("You have %d tr%c left.\n\n",max_guess--,(tries=1 ? y));
          }
          else
          {
              printf("\nCorrect! You got it in %d guesses!\n", tries);
          }
  
      }
        while (guess != num);
  
      return 0;
  }
  
  </code></pre>
  
  <p>What can i do to increase the readability for the conditional statements in printf.</p>