desislava_topuzakova

Untitled

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