Guest User

Untitled

a guest
Mar 17th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package BillRestaurant;
  7.  
  8. import java.text.*;
  9.  
  10. public class Bill {
  11.  
  12. public static void main(String[] args) {
  13. double Meal, HST, Total;
  14.  
  15. Meal = 23.99;
  16.  
  17. HST = Meal * 0.13;
  18.  
  19. Total = Meal + HST;
  20.  
  21.  
  22.  
  23. DecimalFormat x = new DecimalFormat ("###.##");
  24.  
  25. System.out.println(" Resturant bill ");
  26. System.out.println("***************************");
  27. System.out.println("Meal:"+" "+Meal+"$");
  28. System.out.println("HST:"+" "+x.format(HST)+"$");
  29. System.out.println("Total:"+" "+x.format(Total)+"$");
  30. }
  31. }
Add Comment
Please, Sign In to add comment