943,935 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 8191
  • C++ RSS
Oct 20th, 2004
0

Program for calculating miles per gallon

Expand Post »
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!!!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sjopkg is offline Offline
4 posts
since Oct 2004
Oct 20th, 2004
0

Re: Program for calculating miles per gallon

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.
Reputation Points: 26
Solved Threads: 4
Junior Poster
Stack Overflow is offline Offline
185 posts
since Sep 2004
Oct 21st, 2004
0

Re: Program for calculating miles per gallon

Quote originally posted by sjopkg ...
Any help on getting started would be awesome!!!
C++ Syntax (Toggle Plain Text)
  1. // your code here
  2.  
  3. int main()
  4. {
  5. // your code here
  6. return 0;
  7. }
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: How to write a program using a stack
Next Thread in C++ Forum Timeline: c++ help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC