JavaScript

Moderators: None (Apply to moderate this forum)
Number of threads: 2058
Number of posts: 5158

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
JavaScript Program Posted by TheEraserGI on 4 Feb 2012 at 5:45 PM
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.


Attachment: Average MPG.html (2996 Bytes | downloaded 94 times)



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.