Advertisement
silvana1303

repainting

Apr 27th, 2020
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.80 KB | None | 0 0
  1. using System;
  2.  
  3. namespace exampreparation
  4.  
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             int nylonNeeded = int.Parse(Console.ReadLine());
  11.             int paintNeeded = int.Parse(Console.ReadLine());
  12.             int diluent = int.Parse(Console.ReadLine());
  13.             int hoursOfWork = int.Parse(Console.ReadLine());
  14.  
  15.             double nylonExp = (nylonNeeded + 2) * 1.50;
  16.             double paintExp = (paintNeeded * 1.10) * 14.50;
  17.             double diluentExp = diluent * 5.00;
  18.  
  19.             double fullSum = nylonExp + paintExp + diluentExp + 0.40;
  20.             double workersPay = (fullSum * 0.30) * hoursOfWork;
  21.             double fullExp = fullSum + workersPay;
  22.  
  23.             Console.WriteLine($"Total expenses: {fullExp:f2} lv.");
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement