Why is my code giving no output?


#1

int* repeatedNumber(const int* A, int n1, int *len1)
{
int result=(int ) malloc(2sizeof(int));
long long int sumOfN = (n1 * (n1+1) ) /2, sumOfNsq = (n1 * (n1 +1) (2n1 +1) )/6;
long long int missingNumber1=0, missingNumber2=0;
int i;
for(i=0;i<n1; i++)
{
sumOfN -= (long long int)A[i];
sumOfNsq -= (long long int)A[i]
(long long int)A[i];
}

missingNumber1 = (sumOfN + sumOfNsq/sumOfN)/2;
missingNumber2= missingNumber1 - sumOfN;
result[0]=missingNumber2;
result[1]=missingNumber1;
return result;

}