Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please correct the code based on the compiler error message public class Exercisegz 05 CalculateTips & public static void main(Steing[ ] args) { Scanner input
please correct the code based on the compiler error message
public class Exercisegz 05 CalculateTips \& public static void main(Steing[ ] args) \{ Scanner input = new Scanner (System, in); System.out, print("Enter the subtotal: "); double subtotal = input. nextDouble(); System, out, print("Enter the gratuity rate: "); double gratuityRate = input. nextDouble(); double gratuity = subtotal * (gratuityRate /109); double total = subtotal + gratuity; System,out,printf ("The gratuity is $8.2f and the total 15,5%.2f4, gratuity, total); COMPILER ERROR MESSAGES Exerciseb2 05. Javai3: erron: "f" expected public class Exercise02_B5 CalculateTips \{ 1 error 1 pub1ic class Exerciseez 65 CalculateTips (. 4. public static void main(String[l args) {, Scanner input = new Scanner (System. in)a Systen,out,print("Enter the subtotal: 7 ;. double subtotal = input-nextDouble(); 10- 5ystemiout point("Enter the gratuity rate: "); double eratuityRate - input, nextDouble( ) : dooble gratuity = subtota1 * (eratultykate /190); double total - vubtotal - erataity; System,oot.printf("The sratulty is 5x.2f and the total is: 5s.2e, gratuity, total) Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started