title: recursively check if number is a prime
body: <p>I'm trying to check whether the number is a prime(by dividing it by all numbers below n). Here's my attempt : </p>
  
  <pre><code>bool isPrime(int n, int d){
      if (d == 1)
          return true;
      else{
          if (n % d == 0){
              return false;
          }
          else
              return (n,d-1);
      }
  }
  </code></pre>
  
  <p>n - the number to check whether it is prime.
  d - number below n, when calling the function n-1.</p>
  
  <p>Please help me figure out what am I doing wrong.</p>