Carcass wrote:
Given a positive integer p, how many integers are greater than \(2p\) and less than \(4p − 1\)?
A. \(\frac{p}{2}\)
B. \(p\)
C. \(p+1\)
D. \(2p-2\)
E. \(3p-3\)
On option is to apply the
input-output approachLet's see what happens when
p = 4The question becomes:
How many integers are greater than 2(
4) and less than 4(
4) − 1?
In other words,
How many integers are greater than 8 and less than 15?The integers are 9, 10, 11, 12, 13 and 14 (
6 integers)
So, when p =
4, the answer to the question is
6Now we'll check each answer choice to see which one yields an OUTPUT of
6 when we INPUT p =
4A. p/2 =
4/2 =
2. No good. We want an output of
6B. p =
4 =
4. No good. We want an output of
6C. p+1 =
4 + 1 =
5. No good. We want an output of
6D. 2p-2 = 2(
4) - 2 =
6. PERFECT!
E. 3p-3 = 3(
4) - 3 =
9. No good. We want an output of
6Answer: D