Average input calculation
-
I don’t know if this is possible and my maths skills are letting me down because they don’t exist.
What I’m failing to acheive is:
1. User inputs a series of digits between 0 & 10 [eg 2, 7, 4, 9, 8,]
This will be a variable list. Above, the user has inputted 5 digits. It could be 50 digits].
2. A simple calculation adding the list would take place [above = 30].
3. Another calculation would divide this total by the number of digits inputted [in this example it would be 30 divided by 5 = 6]The end result would be an average figure based on the list of numbers inputted.
The big problem is how to input the variable list of numbers (1)
(2) is a simple addition
(3) is a simple division but I need to count the of digits inputted: a text count is all i can think of unless the user inputs the numbers seperated by spaces
- The topic ‘Average input calculation’ is closed to new replies.