You've got the basics, now you need to use them to build up more and more until you have a complete solution. The next step is to make a function that evaluates a single term. Each term has this structure:

sign * multiplier * select(number number)

there is a sign, a multiplier, and two numbers that go into the select function

the sign is based on what n-th term it is, it starts at +1, then alternates between -1 and +1.

the multiplier is one more than what the term number is.

the top number is one of the number you are given from the assignment, (2,4,6, or 8),

and the bottom number is the term number

Code:

int term(int n, int i) {
int sign = i % 2 ? -1 : 1;
int multiplier = i + 1;
// use the variables in combination with your select function to finish this fuction;
}
so term(4,3) will equal this -4(4 3) <-- the parenthesis are the select, with the first number on top

After this, the next step is to make the whole equation. Each equation is made up of several terms, you need to have a for loop that adds together several terms together.