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