Write a program in C program to find the sum of the following:
The input contain a sequence of two or more positive integers terminated by -1. Write a piece of code to count the 'incidence' in this sequence (i.e. the number of pairs of equal, adjacent numbers). For example, the following sequence contains 4 incidences:
4 2 9 9 3 7 7 7 3 3 -1
what method should i used? any example can show me so that i can more understand