Advertisement
dragonbs

Repainting

Sep 15th, 2022
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.99 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _06.Repainting
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double oneNylon = 1.5;
  10.             double onePaint = 14.5;
  11.             double oneThinner = 5;
  12.             double priceTorba = 0.40;
  13.  
  14.             int nylon = int.Parse(Console.ReadLine());
  15.             int paint = int.Parse(Console.ReadLine());
  16.             int thinner = int.Parse(Console.ReadLine());
  17.             int hoursForWorkers = int.Parse(Console.ReadLine());
  18.  
  19.             double sumForNylon = (nylon + 2) * oneNylon;
  20.             double sumForPaint = (paint + 1.1) * onePaint;
  21.             double sumForThinner = thinner * oneThinner;
  22.            
  23.  
  24.             double allSumForMaterials = sumForPaint + sumForThinner + sumForNylon + priceTorba;
  25.             double sumForWorkers = allSumForMaterials * 0.3 * hoursForWorkers;
  26.             double allSum = allSumForMaterials + sumForWorkers;
  27.  
  28.             Console.WriteLine(allSum);
  29.         }
  30.     }
  31. }
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement