View Single Post
Old 12-17-2004, 02:01 PM   #5 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
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.
__________________
Valmont is offline   Reply With Quote