Hi i am writing a c program to check for the number of A+B=C relationships in an input array where A, B and C are 3 distinct elements in the array. Lets say the user is to input two lines. The first line is the number of integer elements he wish to enter, the second line is the integer elements in the array.
So far , my method is:
1) Assign the user input to input[size] where size is specified by the user.
2) Next , i will add input to input and then input to input, then input to input and so on till the size specified by user. I will then continue the same procedure of adding input to input,input to input  till the size entered by user.You get the idea.
Subsequently, i will check the sum of each result and match it with the remaining elements in the array. If there is a match, then counter++.
I cant get my code to work though, i need help.
Or can someone suggest a better method .. Thanks a million.
/* This program caluclates the number of relations in the form A + B= C, given the user input of number of elements and arrary content*/
#define SIZE 100
printf("Please enter the number of integers in your selection: ");
printf("Please enter your integers: ");
scanf("%d",&input[i]); //initialise the arrays
if(i==size-1)// means it has reached the end of the seq of numbers
if(sum==input[n])//check if the sum obtained is equal to any of the numbers in the seq