I have coded a program that, using an array, takes a series of doubles, finds their average, takes the number farthest away from the average, and deletes it. However, it won't find the average right. For data series: data[ 0 ] = 5.6
data[ 1 ] = 6.2
data[ 2 ] = 6.0
data[ 3 ] = 5.5
data[ 4 ] = 5.7
data[ 5 ] = 6.1
data[ 6 ] = 7.4
data[ 7 ] = 5.5
data[ 8 ] = 5.5
data[ 9 ] = 6.3
data[ 10 ] = 6.4
data[ 11 ] = 4.0
data[ 12 ] = 6.9
It says that 5.5 is the farthest from the average, when it is really 4.0. Does any one know what I'm messing up? Thanks!!
Theresa Marlin wrote:Thank you everyone! With a calumnation of your suggestions, I have managed to fix my program. Thanks again for your time!
Care to share what you think calumnation means ?
I thought it was going to be a contender for new word of the day, but I can't find a definition for it. The closest I could find was calumniation - a malicious or knowingly false statement. I'm guessing this isn't what you meant.
Joined: Sep 23, 2009
I'm sorry, I tend to make up words of my own that seem to make sense. Where I go to school, calumnation is a generally accepted word meaning combination ;) I forgot that I was talking to people all over.
There are all sorts of "local" words; my girlfriend used a word once and was surprised that I didn't understand it. My wife (same woman) can still remember it and I can still use that word to wind her up.