Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package BillRestaurant;
- import java.text.*;
- public class Bill {
- public static void main(String[] args) {
- double Meal, HST, Total;
- Meal = 23.99;
- HST = Meal * 0.13;
- Total = Meal + HST;
- DecimalFormat x = new DecimalFormat ("###.##");
- System.out.println(" Resturant bill ");
- System.out.println("***************************");
- System.out.println("Meal:"+" "+Meal+"$");
- System.out.println("HST:"+" "+x.format(HST)+"$");
- System.out.println("Total:"+" "+x.format(Total)+"$");
- }
- }
Add Comment
Please, Sign In to add comment