5
Answers

array question

Tina

Tina

18y
3.2k
1
I am new to C# and I have a problem.I want to get user input for some numbers(not fixed numbers) and find the average of the numbers entered.I figured that I could store the numbers in an array and then go from there.How do I do that?
Thanks.
Answers (5)
0
sudheer kulkarni
NA 2 0 18y
i am not know soory
0
Tina
NA 5 0 18y
Thanks a lot.
0
Solitaire
NA 77 0 18y
An array is not really needed.
Begin with a counter and accumulator.
Use a loop to have user enter a number to add, or zero to stop.
Add that number on to the accumulator (total).
Increment the counter if the number entered is not a zero.
Stop the loop when the number entered is a zero.
Divide the total by the counter to get the average.
0
Tina
NA 5 0 18y
what does that mean?
Anyway, I really need help with this.Please help
0
Mike Gold
NA 32k 21.3m 18y
sounds like a homework problem :-)

-Mike G.