Help using arrays and loops for math

I am trying to construct a C++ script that will utilize an output based upon math equations. Could anyone provide a rough example of code in which I would construct a math equation with a looped array.

For instance I would like to call 2 arrays with two different values, then I would like the program to take each value from the first array and divide by each value in the second array to see if it equals a variable, I call **RATIO**.

__ Example:__

firstArray1 / secondArray1

firstArray1/secondArray2

firstArray1/secondArray3

firstArray2/secondArray1

firstArray2/secondArray2

firstArray2/secondArray3 etc. etc.

I think I will be using an IF statement -

in that IF **RATIO **= firstArray/secondArray etc. then output this .... (not sure if that changes anything)

As always, thanks for helping out someone who is clueless!