# What is X and N? input 1,2,3,4,n output 4,2,0,-2,x

### 1 Answer | Add Yours

The points are (1, 4), (2, 2), (3, 0), and (4, -2). Select two points to calculate the slope.

point 1: (1, 4) point 2: (2, 2)

slope = (y2-y1)/(x2-x1) = (4-2)/(1-2) = 2/-1 = -2

Now write an equation in slope-intercept form: y = mx + b

Use one of the points (1, 4) and m = -2

y = mx + b

4 = -2 * 1 + b

4 = -2 + b

6 = b

Now substitute the values for m and b.

y = -2x + 6

Therefore, if the input is "n", the output is...

**-2n + 6**