Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class YardGreening {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double allArea = Double.parseDouble(scanner.nextLine());
- double totalSum = allArea * 7.61;
- double discount = totalSum * 0.18;
- double sumWithoutDisc = totalSum - discount;
- System.out.printf("The final price is: %.2f lv.%n", sumWithoutDisc);
- System.out.printf("The discount is: %.2f lv.%n", discount);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement