954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Program for calculating miles per gallon

I am a beginning programming student and was stumped on one of my programs. I really don't know where to begin on this one. I have to develop a MC++ program that will input the miles driven and gallons used (both as ints) for each tankful of gas. the program should calculate and display the miles per gallon obtained for each tankful and print the combined miles per gallon obtained. all average calculations hould produce floating-point results. I must use a sentinel value to determin when the user is finished entering input...

Any help on getting started would be awesome!!!

sjopkg
Newbie Poster
4 posts since Oct 2004
Reputation Points: 10
Solved Threads: 0
 

This is a section for posting complete and detailed tutorials regarding the C / C++ language.

This is not the place to post questions regarding the framework and design of the source code of your potential program. Rather, direct all questions regarding any errors or problems you may be having here .

Edit: Post has been moved.

Stack Overflow
Junior Poster
193 posts since Sep 2004
Reputation Points: 26
Solved Threads: 4
 
Any help on getting started would be awesome!!!
// your code here
 
 int main()
 {
    // your code here
    return 0;
 }
Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You