A Looped Array Or If Statements?

Hi:::

I am relatively new to programming and am trying to assemble a project that involves some math calculations.

I have a set of A values that I want divided by B values, each contain about 13 constants. And each set contains the same constants.

A values (12, 18, 21 etc.)

B values (12, 18, 21 etc)

the code preceding this calculates an answer and looks for corresponding values from A and B that fulfils that answer (it deals with slopes).

I could find every possible slope combination that A and B fulfills such as 12/12, 12/18, 12/21 , 18/12, 18/18 etc. and preload the program with IF statements ? I am assuming there is about 20 combination answers. Does extensive IF statments bog down the program?

Or would it be better to run a looped array?

Thank you for your time in responding!