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
COP Homework #
This program displays a welcome message to the output console.
double subtotal input.nextDouble
double gratuityRate input.nextDouble :
double gratuity subtotal gratuityRate ; double total subtotal gratuity:
import java.util.Scanner;
Scanner input new Scanner
System.in:
System.out.printEnter the driving distance: :
float distance input.nextFloat
System.out.printEnter miles per gallon: :
float input.nextFloat
System.out.printEnter price per gallon: t:
float pricePerGallon input.nextFloat :
float cost distance pricePerGallon;
Svstemeut.printloThe cost of driving is $ cost:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
