QUOTE(ziburgos27 @ 23 Aug, 2008 - 01:18 PM)

QUOTE(ziburgos27 @ 23 Aug, 2008 - 01:09 PM)

How would I answer this question?
Input a list of people's ages form the user ( terminated by 0) and find the avarage?
How would I write the code?
this is what I came up with:
Input Number
While Number > o
Write Number
Input Number
End with average of number
write "Done"
QUOTE(Martyr2 @ 23 Aug, 2008 - 01:20 PM)

Average is a sum of the values divided by the number of values. As for an example of how you can do this, you need to provide your code you have so far and then we can assist you. We DO NOT do people's homework for them. You have to show an effort first.

this is what I came up with:
Input Number
While Number > o
Write Number
Input Number
End with average of number
write "Done"