Looks like you got a lot of the file I/O handled.. i'll just give ye' a little psuedo to get you on your way:
//Load your files into int[20] arrays
for(int i=0; i<20; i++)
{
file1 >> array_one[i];
file2 >> array_two[i];
}
//Multiply each array, element-by-element and save results in an int[20]
for(int i=0; i<20; i++)
{
results[i] = array_one[i] * array_two[i];
}
//Write results[20] to the output file.
Clinton Portis
Practically a Posting Shark
833 posts since Oct 2005
Reputation Points: 237
Solved Threads: 118