- 40

- 0

Below is an example with C=A+B, which makes Set 2 the highest value:

Set 1: A=65, B=75, C=140;

Set 2: A=50, B=100, C=150;

Set 3: A=54, B=90, C=144;

Set 4: A=72, B=72, C=144;

Set 5: A=71, B=73, C=144;

Set 6: A=71, B=71, C=142;

But I want either Set 4 or 5, which has *both* A and B being closer to 100, and also a high A+B value.

If you know/understand computer code:

if(C>previousC) isBestSet=SetNumber;

I do not care if C is a big or small number, meaning I do not care if I need to pick the biggest or smallest C.

Thanks