Question: make the following java code run with no errors, ? ? * * Dawson Vause COP 2 8 0 0 - Homework # 1

make the following java code run with no errors, "
??**
Dawson Vause
COP2800- Homework # 1
112?19
This program displays a welcome message to the output console.
*/
double subtotal = input.nextDouble
double gratuityRate = input.nextDouble :
double gratuity = subtotal ?**(gratuityRate (:100}; double total = subtotal + gratuity:
import java.util.Scanner;
Scanner input = new Scanner
System.in):
System.out.print("Enter the driving distance: "):
float distance = input.nextFloat .
System.out.print("Enter miles per gallon: "):
float mpg= input.nextFloat ).
System.out.print("Enter price per gallon: "t):
float pricePerGallon = input.nextFloat () :
float cost distance ?mpg pricePerGallon;
Svstemeut.printlo("The cost of driving is $"+ cost):"
 make the following java code run with no errors, " ??**

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!