title: prime factors of a number
body: <p>I was trying to develop a code to compute the [prime factors][1] of a number, but I am getting nothing as output. Can anyone point out where I am making the mistake?</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;math.h&gt;
  
  
  int prime_check(int i)
  {
      int j;
      for(j=2;j&lt;i;j++)
      {
          if(i%j==0)
              return 0;
      }
      return i;
  }
  void prime(int n)
  {
      double c=sqrt(n);
      int i;
      int p[10];
      //printf("factors are: ");
      for(i=1;i&lt;=c;i++)
      {
          p[i]=prime_check(i);
          //printf("%d  ",p[i]);
  
          if(n % p[i] == 0)
              printf("%d ",p[i]);
  
      }
  }
  
  main()
  {
  
  
      //printf("enter the number:\t");
      int num=36;
      //scanf("%d",&amp;num);
      prime(num);
  }
  </code></pre>
  
  <p>TO EVERYONE I GOT THE ANSWER! Thanks Jeff Mercado for showing me my mistake</p>