Question Solved1 Answer IN JAVA Write a program that reads a restaurant bill and a gratuity (tip) rate, then computes the tip and total bill. For example if the user enters 10.00 for the bill and a 15% tip rate, the program displays #1.50 as the tip and $11.50 as the total. Run your program twice, using the following input: Run 1: Enter the bill: 200.00 Enter the tip rate: 20% Run 2: Enter the bill: 150.00 Enter the tip rate: 25%

QA1CBK The Asker · Computer Science

IN JAVA

Write a program that reads a restaurant bill and a gratuity (tip) rate, then computes the tip and total bill. For example if the user enters 10.00 for the bill and a 15% tip rate, the program displays #1.50 as the tip and $11.50 as the total.

Run your program twice, using the following input:

Run 1:

Enter the bill: 200.00

Enter the tip rate: 20%

Run 2:

Enter the bill: 150.00

Enter the tip rate: 25%

More
See Answer
Add Answer +20 Points
Community Answer
V6CFH2 The First Answerer
See all the answers with 1 Unlock
Get 4 Free Unlocks by registration

Screenshots of java program input output given below: Enter the bill:10.00Enter the tip rate:15Tip is: $1.50Total is: $11.50Enter the bill:200.00Enter the tip rate:20Tip is: $40.00Total is: $240.00Enter the bill:200.00Enter the tip rate:20Tip is: $40.00Total is: $240.00Enter the bill:150.00Enter the tip rate:25Tip is: $37.50Total is: $187.50 Java Code: import java.util.Scanner;                   //import Scanner class used to take input from user. public class RestaurentBill {     public static void main(String[] args){         Scanner scanner = new Scanner(System.in);               //create Scanner class object                  System.out.println("Enter the bill:");         double bill=scanner.nextDouble();                       // ... See the full answer