Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package exercise;
- public class exercise {
- public static void main(String[] args) {
- int cost = 70;
- double vat = 0.20;
- double rate = cost * vat;
- double total = cost + rate;
- System.out.println("Cost: " + "£" + cost);
- System.out.println("VAT: £" + cost * vat);
- System.out.printf("Total: £%4.2f" , total);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement