Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace silvanadoc
- {
- class Program
- {
- static void Main(string[] args)
- {
- double height = double.Parse(Console.ReadLine());
- double lenght = double.Parse(Console.ReadLine());
- double triangleHeight = double.Parse(Console.ReadLine());
- double frontWall = (height * height) * 2 - 1.2 * 2;
- double sideWalls = (height * lenght) * 2 - ((1.5 * 1.5) * 2);
- double greenPaint = (frontWall + sideWalls) / 3.4;
- double roof = 2*(height * lenght);
- double roofTriangle = 2 * (height * triangleHeight / 2);
- double redPaint = (roof + roofTriangle) / 4.3;
- Console.WriteLine($"{greenPaint:f2}");
- Console.WriteLine($"{redPaint:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment