07-12-2007 10:50 PM
07-12-2007 10:59 PM
07-12-2007 11:12 PM
07-12-2007 11:18 PM
07-12-2007 11:33 PM
Think about the random number generation. You could just take your [0..1] random number and multiply it by 35, then add 15 to get the [15..50] range. This eliminates the case struture. Seems more reasonable than to generate [0..50] and the throw away everything below 15 as you are doing now.
Then you need to keep track of the sum of all so far acquired random numbers so you can calculate the average. The keyword would be "initialized shift register", something you probably learned in class.
To chart the random number and running average on the same chart, bundle them before the chart to get two traces.
The rest should fall into place after a few tweaks. Good luck!