Advertisement
Spocoman

Programming Book

Sep 9th, 2024
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.78 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         double pagePrice = Double.parseDouble(scanner.nextLine()),
  7.                 coverPrice = Double.parseDouble(scanner.nextLine()),
  8.                 discountPercentage = Double.parseDouble(scanner.nextLine()),
  9.                 designerSalary = Double.parseDouble(scanner.nextLine()),
  10.                 teamPercentage = Double.parseDouble(scanner.nextLine()),
  11.                 totalPrice = ((pagePrice * 899 + coverPrice * 2)
  12.                         * (100 - discountPercentage) / 100 + designerSalary)
  13.                         * (100 - teamPercentage) / 100;
  14.  
  15.         System.out.printf("Avtonom should pay %.2f BGN.", totalPrice);
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement