SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top