how to develop a algorithm for mean value..
As you are aware an algorithm is not C or C++ code, it is an expression of the logic to be followed to achieve the desired result.
for example the following is an algorithm to convert from decimal to binary.
1. assert x>0.
2. set k=0.// k is a subscript
3. if x is odd, set b[k]=1. otherwise set b{k]=0.
4.subtract b[k] from x.
5. divide x by 2.
6 add 1 to k.
7. if x>0 repeat steps 3-6.
8. return b[k]......b[2]b[1]b[0].
so in your case........to be practical you have to limit the number of integers input.
1. enter an integer.
2. keep count of number or integers input
3. maintain a running total.
4. repeat 1-2 until Ctrl+Z is pressed (this completes input and gives count a final value).
5. Calculate mean (running total / count).
6. print mean.
Was this the sort of thing you were looking for?