title: Check if prime number using recursive and no loop in turbo c
body: <p>Good Day,</p>
  
  <p>I'm trying to make a code that would determine the prime numbers between two numbers. This should be done recursively and without any loop. So far I have this code:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;conio.h&gt;
  void prime(int x, int y){
      int waa;
      if(x &lt;= y){
          waa = isPrime(x);
          if(waa==1 || waa == 0){
               printf("");
           }else{
               printf("%5d",waa);
           }
          prime(x+1,y);
      }
  }
  
  int isPrime(int n, int i){
      i = 2;
      if(i&lt;n){
          if(n%i==0 &amp;&amp; n!=2 &amp;&amp; n!=i){
           return(0);
          }else{
              return(n);
          }
           i++;
           isPrime(n,i);      
      }
  }
  
  void main(){
      int num[2];
      clrscr();
  
      printf("Input 2 numbers: \n");
      scanf("%d %d", &amp;num[0], &amp;num[1]);
      prime(num[0], num[1]);
      getch();
  }
  </code></pre>
  
  <p>the output between 1 and 10 is: 2,2,3,5,7,9.
  expected output: prime numbers 2,3,5,7</p>
  
  <p>Would anyone be able to help me with this.</p>
  
  <p>much appreciated</p>
  
  <p>Thank you</p>