Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Greening {
  4.     public static void main(String[] args) {
  5.         Scanner scan = new Scanner(System.in);
  6.         int greenarea = Integer.parseInt(scan.nextLine());
  7.         double cena = greenarea * 7.61;
  8.         double discount = cena * 0.18;
  9.         double finalPrice = cena - discount;
  10.         System.out.printf("The final price is: %.2f lv." ,finalPrice);
  11.         System.out.printf("The discount is: %.2f lv." ,discount);
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement