Advertisement
Spocoman

Programming Book

Dec 12th, 2021 (edited)
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.79 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ProgrammingBook
  4. {
  5.     class Program
  6.     {
  7.         public static void Main()
  8.         {
  9.             double pagePrice = Double.parseDouble(scanner.nextLine()),
  10.                 coverPrice = Double.parseDouble(scanner.nextLine()),
  11.                 discountPercentage = Double.parseDouble(scanner.nextLine()),
  12.                 designerSalary = Double.parseDouble(scanner.nextLine()),
  13.                 teamPercentage = Double.parseDouble(scanner.nextLine()),
  14.                 totalPrice = ((pagePrice * 899 + coverPrice * 2)
  15.                         * (100 - discountPercentage) / 100 + designerSalary)
  16.                         * (100 - teamPercentage) / 100;
  17.  
  18.             Console.WriteLine($"Avtonom should pay { totalPrice:f2} BGN.");
  19.         }
  20.     }
  21. }
  22.  
  23.        
  24.    
  25.  
  26.  
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement