Question: Java Miles Per Gallon Create a program in Java that accepts the miles driven (as a decimal) and the gallons used (as a decimal). Calculate
Java Miles Per Gallon
Create a program in Java that accepts the miles driven (as a decimal) and the gallons used (as a decimal). Calculate the miles per gallon and display the result (as a decimal).
Read in the miles and gallons using the Scanner class.
If 0 is entered in for the gallons used, display "Can not calculate."
Do not print out anything requesting the miles or gallons. For testing, two decimal values will be entered into your program.
Please help me soon this is due at 6pm today Jan 18, 2018
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
