Advertisement
Valantina

Repainting

Jul 9th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 KB | None | 0 0
  1. using System;
  2.  
  3. namespace P01_Repainting
  4. {
  5.     class P01_Repainting
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int nylonSize = int.Parse(Console.ReadLine());
  10.             int paintLiters = int.Parse(Console.ReadLine());
  11.             int diluentLiters = int.Parse(Console.ReadLine());
  12.             int days = int.Parse(Console.ReadLine());
  13.  
  14.             double nylonPrice = 1.50;
  15.             double paintPrice = 14.50;
  16.             double diluentPrice = 5;
  17.             double bagsPrice = 0.40;
  18.  
  19.             double expenses = (nylonSize + 2) * nylonPrice + paintLiters * 1.10 * paintPrice + diluentLiters * diluentPrice + bagsPrice;
  20.             double workersExpenses = days * (expenses * 0.30);
  21.             double totalExpenses = workersExpenses + expenses;
  22.  
  23.             Console.WriteLine($"Total expenses: {totalExpenses:F2} lv.");
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement