Advertisement
yovkovbpfps

Yard Greening

Apr 15th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Project {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. double area = Double.parseDouble(scanner.nextLine());
  8.  
  9. double price = area * 7.61;
  10.  
  11. double discount = price * 0.18;
  12.  
  13. double finalPrice = price - discount;
  14.  
  15. System.out.println(String.format("The final price is: %.2f lv.",finalPrice));
  16. System.out.println(String.format("The discount is: %.2f lv.",discount));
  17.  
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement