Anzzhhela98

ff

Jun 9th, 2020
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.96 KB | None | 0 0
  1. using System;
  2.  
  3. namespace боядисване
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double high = double.Parse(Console.ReadLine());
  10.             double lenght = double.Parse(Console.ReadLine());
  11.             double hightRoof = double.Parse(Console.ReadLine());
  12.             double windows = 1.5;
  13.             double firstWalls = (high * lenght) * 2;
  14.             double finalWindows = (windows * windows) * 2;
  15.  
  16.             double secondWalls = ((high * high)*2) - (1.2 * 2);
  17.  
  18.             double greenPaint = (firstWalls - finalWindows) + secondWalls;
  19.             double greenPAintFinal = greenPaint / 3.4;
  20.  
  21.             double rectangleRoof = (high * lenght) * 2;
  22.             double triangleRoof = (high * hightRoof/2) * 2;
  23.             double redPaint = (rectangleRoof + triangleRoof) / 4.3;
  24.             Console.WriteLine($"{greenPAintFinal:f2}");
  25.             Console.WriteLine($"{redPaint:f2}");
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment