25 March 2010

Task 36 - Generate 100 random numbers 0-9, calculate their Mean (average), & output the result to the Serial Monitor (2)


The Serial Monitor output shows the Mean calculated from the 100 random numbers generated by the program.

This variable must be a 'float' in order to show the result to (default) 2 decimal places; an 'int' or 'long' merely gives an integer - I found that this usually turned out to be 4, & occasionally 5 - unsatisfactory.


1 comment: