Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace боядисване
- {
- class Program
- {
- static void Main(string[] args)
- {
- double high = double.Parse(Console.ReadLine());
- double lenght = double.Parse(Console.ReadLine());
- double hightRoof = double.Parse(Console.ReadLine());
- double windows = 1.5;
- double firstWalls = (high * lenght) * 2;
- double finalWindows = (windows * windows) * 2;
- double secondWalls = ((high * high)*2) - (1.2 * 2);
- double greenPaint = (firstWalls - finalWindows) + secondWalls;
- double greenPAintFinal = greenPaint / 3.4;
- double rectangleRoof = (high * lenght) * 2;
- double triangleRoof = (high * hightRoof/2) * 2;
- double redPaint = (rectangleRoof + triangleRoof) / 4.3;
- Console.WriteLine($"{greenPAintFinal:f2}");
- Console.WriteLine($"{redPaint:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment