1) Setup the required model in a file. Let's take a simple text file "IntPairs.txt".
Code:
1 5
3 2
43 98
200 7
7 980
90 99
2) Create your three arrays.
3a) Open the text file for reading. Read each record, storing the first element of the record in the first array. Store the second element of the record in the second array.
3b) Do this in a loop until there are no more records to be read.
4) Do the math things. Store it in the third array.
5) Do the output things.