title: why it's showing error after showing the result?
body: <p>i have made a program for finding prime factor of any number with the help of recursion.On compiling the program compiler is showing no type of error or warning and it's showing correct result also but problem is that after showing the result compile is showing a error something like " primere.exe is stop working". ( primere is my program's name.Please help! </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int prime(int, int);
  int main()
  {
      int num, i = 2;
      printf("enter the number:\t");
      scanf("%d", &amp;num);
      prime(num , i);
      getch();
  }
  int prime(int num, int i)
  {
      int j = 2;
      if (num == 0)
          return 0;
      if (num % i == 0)
      {
          printf("%d ", i);
          prime(num / i, j);
          return 0;
      }
      else if (num % i != 0)
      {
          prime(num, i + 1);
          return 0;
      }
  }
  </code></pre>