| | |
Program for calculating miles per gallon
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2004
Posts: 4
Reputation:
Solved Threads: 0
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!!!
Any help on getting started would be awesome!!!
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.
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
IRC
Channel: irc.daniweb.com
Room: #c, #shell
•
•
•
•
Originally Posted by sjopkg
Any help on getting started would be awesome!!!
C++ Syntax (Toggle Plain Text)
// your code here int main() { // your code here return 0; }
"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
![]() |
Similar Threads
- C++ help not sure where to start (C++)
- miles per gallon help (Java)
- Help please with incorrect gas mileage calculation (C)
- HOW TO PROGRAM C++ homework (C++)
Other Threads in the C++ Forum
- Previous Thread: How to write a program using a stack
- Next Thread: c++ help
| Thread Tools | Search this Thread |
api array based binary c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






