Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

JavaScript Program

I have some homework to do and I have written the code. It all works accept the averaging part. Can someone give me some guidance on why I can't get the average? In the homework, the user has to input the number of miles they have driven on a tank of gas and the number of gallons of gas they filled up with (can enter as many times as they want). The program has to give the number of miles per gallon and then the average number for all fill-ups concurrently. The program is attached.

Thank you in advance for any assistance I receive.


Sign In or Register to comment.