title: how to get in while loop with this code in C
body: <p>I'm just starting to study language C, and trying to create my own function.
  But, I don't understand why my while loop doesn't run within this code. I tried many ways such as ==, !=, &lt; , >...etc, but I don't understand why it doesn't run properly. </p>
  
  <p>PS. I misunderstood what factorial is :( I changed the code with all you guys advise. Thanks all</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int my_iterative_factorial(int nb)
  {
    int i;
    int store;
  
    i = 1;
    if(nb == '0')
      return(0);
    while (nb &gt; 0)
    {
      i = i * nb;
      nb--;
    }
    return(i);
  }
  
  int main(void)
  {
    int nb;
  
    nb = 5;
    printf("%d\n",my_iterative_factorial(nb));
    return(0);
  }
  </code></pre>