This is a for loop (with a couple others nested inside) I'm using to output some averages for the following input file.
But for some reason the main loop doesn't function correctly. It will output correctly but on the last time through it keeps outputting the last averages what seems like an infinite number of times. Is there a flaw in my code that I'm missing? I've checked it multiple times and I can't see what's wrong with it. If any more info is needed I will be glad to provide it... thanks for the help.
It looks like (without compiling and testing) that every time that first for loop is being done, numLoops will always start at 'tests' and increment by 1, because each time through the loop, the last thing that happens is numLoops is equal to tests:
Thank you it did work. I should probably post this next question on another topic but I feel like it's a relatively simple one so I'll ask it right here. Now I need to close and reopen my input file but I can't seem to do that. I invoked In.clear() and In.close() and tried reopening it but it still doesn't work... thanks for the help.