Nadroj,

Thanks for taking the time to respond with such an in-depth post. Sorry about posting erroneous code - it had some things (the grd1) in it I was using to diagnose the problem with the e notation and I forgot to remove them before posting.

About your suggestions - they make things clearer for me, but we haven't reached arrays in my course so I don't think I can use that. I don't understand how I would rewrite the program in the ways you've suggested (for example, calcAverage). I'm sorry, I don't mean to be rude or troublesome, but is there a way I can write the program without the use of arrays?

Thanks again for your time.