Advertisement
M0Hk

Redecorating

Sep 17th, 2023
551
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.88 KB | Software | 0 0
  1. using System;
  2. using System.Diagnostics.Metrics;
  3.  
  4. namespace firstLesson
  5. {
  6.     internal class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             int nylonAmount = int.Parse(Console.ReadLine());
  11.             int paintLiters = int.Parse(Console.ReadLine());
  12.             int thinnerLiters = int.Parse(Console.ReadLine());
  13.             int craftsmanHours = int.Parse(Console.ReadLine());
  14.  
  15.             double nylonPrice = (nylonAmount + 2) * 1.50;
  16.             double paintPrice = paintLiters * 1.1 * 14.50;
  17.             double thinnerPrice = thinnerLiters * 5;
  18.            
  19.             double totalMats = nylonPrice + paintPrice + thinnerPrice + 0.40;
  20.             double craftsmanHourPrice = totalMats * 0.3;
  21.  
  22.             double grandTotal = totalMats + craftsmanHourPrice * craftsmanHours;
  23.  
  24.             Console.WriteLine(grandTotal);
  25.  
  26.  
  27.         }
  28.     }
  29. }
Tags: Redecorating
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement