write a function that when called will ask the user for a series of numbers to be entered 1 at a time and then calculates their sum,their average,and their average rounded up then output the results.

for example the average of a series of numbers is found by adding the numbers together and dividing by the amount of numbers entered (so the average of 2,5,1 and 7 is equal to (2+5+1+7)/4=15/4=3.75).

devnull69

07-05-2011, 02:48 PM

Please show us what you have already

Philip M

07-05-2011, 03:29 PM

Blatant homework!! See Forum Rule 1.5

It is not really in your best interests that others do all or most of your homework for you. Your teacher may gain a false and exaggerated idea of your programming capabilities and so not offer you the support you need. Also, if you hand in other people's work which you do not completely understand, then you will start to fall behind and your difficulties will increase. Finally, there is a limit to the number of times that you can take your pitcher to this well!

Hamza7

07-05-2011, 04:04 PM

Here is the code, I made my best efforts to make it short and simplified as much as possible:

You can also download the file from:
http://www.filesonic.com/file/1373933404/calculateAvg.js

university

07-06-2011, 06:09 PM

Blatant homework!! See Forum Rule 1.5

It is not really in your best interests that others do all or most of your homework for you. Your teacher may gain a false and exaggerated idea of your programming capabilities and so not offer you the support you need. Also, if you hand in other people's work which you do not completely understand, then you will start to fall behind and your difficulties will increase. Finally, there is a limit to the number of times that you can take your pitcher to this well!

its not homework im new at this sort of stuff and so this summer am really trying to get the hang of it and understand it better for next year as im goin to be dong course init...and i know if i just copy something it will be of no use to me am asking questions because i really need help so came across this website so thought i cud get some help that is all!

Philip M

07-06-2011, 07:51 PM

Once more, this forum is not a substitute for a student textbook, nor a free coding service. It aims to help people overcome specific problems with Javascript. Show us the code you yourself have written and we will be happy to correct or improve it. But you must make a genuine effort yourself.