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