Programming Challenge: 10 - Miles Per Gallon
Rather then hard-code the values for miles and gallons, prompt the user for this information and accept it using
cin statements as shown in class. Make sure you use the appropriate data type for miles and gallons!
Deliverables:
A C++ program file entitled PC2-10.cpp containing the source code to Programming Challenge 10.
An image entitled PC2-10.xxx containing the screen shot for Programming Challenge 10 where the file type xxx
is be the image file format of your choice (jpg, png, bmp, whatever). If possible, show the screen shot over the
code, as demonstrated in class. There should not be an actual "xxx" in your file name, that just stands in for the
file type, which will be png or jpg or whatever. Make sure your screen shot is black text on a white screen, as per
the homework submission instructions.
Use inputs 325 miles and 15.5 gallons for your screen shot.
Check List:
Did you name your .cpp file exactly as specified on Moodle?
• Is your name at the top of your code, as shown in the programming examples?
Did you use the appropriate data type for your variables?
Did you make appropriate use of comments within your code?
Did you include a screen shot using the designated inputs?
Is that screen shot set to dark text on a light background?
• See the "How to submit..." document for instructions on this.
Does that screen shot have an "XXX" anywhere in the file name?
• The answer to that question should be "NO!"
Did you copy any portion of your homework from the web, a group chat, or an Al tool such as ChatGPT?
• The answer to that question should also be "NO!"
• Did you use features of C++ not yet covered in class?
• For the third time, "NO!"