title: Ask the user for a number between 1 and 15 (check it using while loop) and print a row of that many stars?
body: <p>If the user enters 5 it should print</p>
  
  <pre><code>* * * * *
  </code></pre>
  
  <p>This is what I have so far. Please help. Tell me what is wrong. The output just keeps printing <code>*</code>. It won't stop.</p>
  
  <pre><code>    //declare variables 
      int star;
      int num;
  
      printf("Enter a number between 1 and 15: ");
      scanf("%i", &amp;num);
      while(num&lt;1||num&gt;15){
      printf("Invalid input\nPlease re-enter: ");
      }
      for(star=num;num&lt;15;num--){
      printf("* ");
      }
  </code></pre>