alright im just gonna take a wild guess at this, can't be too hard

you can kind of do something like this (note: my "style" of coding is really.... unclean, so you just have to bear with me)

Code:

**int** a,b,c,d,e; //the 5 numbers that the user will input
**int** pattern[50]; //50 because i'm not counting how much im going to actually need
//....
// put all the bullcrap entering of the numbers here
//....
//now to calculate the possible patterns (going by addition, subtraction, multiplication, and division only)
pattern[0] = b - a; //to find the sum that was added from a to get to b
pattern[1] = b + a; // to find the differance
pattern[2] = b / a; // to find the product that was multiplied to a to get b
pattern[3] = b * a; // to find the divisitidaslgasjg (i can't think of the word for division right now)
pattern[4] = c - b; //do the same for b to c
//....
//do the same for each letter
//....
//now you can check to see if there really is a pattern
**if** (pattern[0] == pattern[5]) //pattern 1 would be the sum that was added to a to get b
//and pattern 5 would be the sum that was added to b to get c.
//if both patterns EQUAL, then there is one sum pattern
{
//..
//do what you want
//..
}
// and then you would go on to check if, lets say
// pattern 1 and 10 (10 would be addition from c to get to d)
// and then do the same thing over and over again
// and idk im just giving you *ideas* on how it could be done

OF COURSE, this would be a REALLy __bad__ and complex way to do it, i'm sure others can think of a more simple solution

i'm just trying to show you, how it *can* be done