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.
Loading
sudheer kulkarniPosted Jul 20, 2006, 7:30 AM
TinaPosted Jul 14, 2006, 10:46 AM
SolitairePosted Jul 12, 2006, 6:46 PM
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.
TinaPosted Jul 11, 2006, 5:17 PM
Anyway, I really need help with this.Please help
Mike GoldPosted Jul 10, 2006, 11:27 PM
-Mike G.