previous | start | next

Answers

  1. 17 and 29
  2. Only s3 is divided by 3. To get the correct result, use parentheses. Moreover, if s1, s2, and s3 are integers, you must divide by 3.0 to avoid integer division:
    (s1 + s2 + s3) / 3.0


previous | start | next