Advertisement
veronikaaa86

09. Yard Greening

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