im trying to make a working program which has to go throught all the 3 digits permutations from a given array of X elements and in every loop sum all the 3 digits and compare it to given number the next rule which is being applied is : sum of any 2 numbers from given permutation must be > than the 3rd number in the permutation

what i tried:

```
for (int q = 0; q < sizeofarray; q++) 

 for (int w = 0; w < sizeofarray; w++) 

  for (int e = 0; e < sizeofarray; e++){

compare_digits_from_permutation_to_given_number

(givennumber,array[q],array[w],array[e]);

}

```

my code absolutely doesnot work , this is just the part which should do the thing that i am asking about , but it do permutations just of the first 3 elements , the array is dynamic i also dont have idea how to do that , sum of any 2 numbers must be more than the 3rd side