JavaScript Program - Programmers Heaven

Howdy, Stranger!

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


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.