Simple question but, I see exclusive and inclusive when referring to number ranges.
For example, this is a line from an algorithms book:
The following function prints the powers of 2 from 1 through n (inclusive).
What is meant by this? What makes a number range inclusive or exclusive?
while(i++ < exclusiveNum)
andwhile(i++ <= inclusiveNum)
. :)inclusive
/exclusive
, to explain if the end points (x or y) is included in the description context. (In maths, it is written as [x,y], (x,y) or [x,y), depending if the ends is included)