title: factorial using increement for loop gives garbage value
body: <pre><code>#include&lt;iostream&gt;
  using namespace std;
  
  int main()
  {
    int fact;
    for(int i=1; i&lt;=fact; i++)
    {
       fact = fact*i;
    }
    cout&lt;&lt;fact;
  }
  </code></pre>
  
  <p>Output : garbage value.</p>
  
  <p>Please anyone tell me why using increment for loop gives me this but not decrement for loop.</p>