Hi guys,
I'm sure this is pretty simple really, but I can't get my head around it.
I have a long equation that I'm using c++ to work out. It involves a random number generator, so each time the program is run, it replaces one of the variables in the equation with a random number. This gives me a different result each time :)
What I want to do is run the program a million times, store every result that I obtain, and then get an average at the end.
I'm thinking I should put a for loop at the start of my equation, but do I use a counter to record every result I get? I'm really not sure.
Thanks for any help you can give me, if you would like me to post some code I can do...
Andy.