Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Greening {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int greenarea = Integer.parseInt(scan.nextLine());
- double cena = greenarea * 7.61;
- double discount = cena * 0.18;
- double finalPrice = cena - discount;
- System.out.printf("The final price is: %.2f lv." ,finalPrice);
- System.out.printf("The discount is: %.2f lv." ,discount);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement