Program for calculating miles per gallon

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2004
Posts: 4
Reputation: sjopkg is an unknown quantity at this point 
Solved Threads: 0
sjopkg sjopkg is offline Offline
Newbie Poster

Program for calculating miles per gallon

 
0
  #1
Oct 20th, 2004
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!!!
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 185
Reputation: Stack Overflow is an unknown quantity at this point 
Solved Threads: 4
Stack Overflow's Avatar
Stack Overflow Stack Overflow is offline Offline
C Programmer

Re: Program for calculating miles per gallon

 
0
  #2
Oct 20th, 2004
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.
Following the rules will ensure you get a prompt answer to your question. If posting code, please include BB [code][/code] tags. Your question may have been asked before, try the search facility.

IRC
Channel: irc.daniweb.com
Room: #c, #shell
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4,345
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 237
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: Program for calculating miles per gallon

 
0
  #3
Oct 21st, 2004
Originally Posted by sjopkg
Any help on getting started would be awesome!!!
  1. // your code here
  2.  
  3. int main()
  4. {
  5. // your code here
  6. return 0;
  7. }
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC