title: prime numbers in r counting and printing at the same time
body: <pre><code>prime &lt;- function(x){
  }
  </code></pre>
  <p>could you use the function above to print out numbers between 1 and 100 AND count the prime numbers less than 100. Only use the function above.</p>
  <p>Here's the part of what I attempted below:</p>
  <pre><code>for (x in 1:20) {
  if(is.prime(x))
  print(x)
  }
  </code></pre>
  <p>I'm not sure how to combine that with a statement saying there are 25 prime numbers between 0 and 100</p>