title: What is the total number of additions and multiplications in the following code?
body: <p>I'm in a discrete math class and he explained very little about programming and code so far.  He also said he likes to throw in crazy questions to our homework to throw us off.  Thus, I'm here to learn from you for this particular question! (I don't know how to further research this question since I'm not sure what language this is, I think it might be C++?)</p>
  
  <p>What is the total number of additions and multiplications in the following code?</p>
  
  <pre><code>s := 0
  for i := 1 to n
      s:= s + i
      for j:= 1 to i
          s := s + j*i
      next j
  next i
  s := s+10
  
  
  (a) n 
  (b) n^2
  (c) n^2 + 2n 
  (d) n(n + 1)
  (e) (n + 1)^2 
  (f) none of these.
  </code></pre>