what is Exclusive and Inclusive

what is Exclusive and Inclusive

·

1 min read

Exclusive

Definition

Exclude the last number in array

Explanation

If a function will compute $$2^i$$ where $$i = 1, 2, ..., n$$ i can have values from 1 up to and excluding the value n. We says, n is exclude in exclusive

Example

1 through 10 (exclusive) = [1, 10)
1 2 3 4 5 6 7 8 9

Inclusive

Definition

Include the last number in array

Explanation

If a function will compute $$2^i$$ where $$i = 1, 2, ..., n$$. i can have values from 1 up to and including the value n. We says, n is Include in Inclusive

Example

1 through 10 (inclusive) = [1, 10]
1 2 3 4 5 6 7 8 9 10