The problem is to find in an array of integers a sequence of consecutive numbers whose sum is equal to n.
Our program will read a list of integers (e.g., 5 2 3 4 6 1 4 10 1), followed by one integer n (e.g., 7). Example output:
5 2 3 4 6 1 4 10 1
7
5 + 2 = 7
3 + 4 = 7
6 + 1 = 7