title: How to write an R function or loop that will print every third number or nth number in [1, 100]?
body: <p>I am trying to write a function in R which will print every 3rd number in [1,100]; this is what I have tried, but this doesn't produce every third number, it produces every number</p>
  
  <pre><code>x &lt;- c(100)
  question.1 &lt;- function (x){
  out &lt;- seq(x)
   return(out)
  }
  question.1(x)
  </code></pre>
  
  <p>Am I missing something? Any help you can offer would be greatly appreciated!</p>