Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace DogHouse
- {
- class Program
- {
- static void Main(string[] args)
- {
- double LenghtA = double.Parse(Console.ReadLine());
- double HighB = double.Parse(Console.ReadLine());
- double bothSide = LenghtA * (LenghtA / 2) * 2;
- double backSide =
- /*square*/ ((LenghtA / 2) * (LenghtA / 2)) +
- /* triangle*/ (LenghtA / 2) * (HighB - (LenghtA / 2)) / 2.00;
- //double Entrance = (LenghtA/(HighB/2.0))* (LenghtA / (HighB / 2.0));
- double Entrance = (LenghtA / 5.0) * (LenghtA / 5.0);
- double frontWall = backSide - Entrance;
- double totalWallArea = bothSide + backSide + frontWall;
- //double greenPaint = totalWallArea/ (LenghtA / 2.0);
- double greenPaint = totalWallArea / 3.0;
- double theRoof = LenghtA * (LenghtA / 2) * 2;
- //double redPaint = theRoof / (HighB / 2.0);
- double redPaint = theRoof / 5;
- Console.WriteLine("{0:f2}", greenPaint);
- Console.WriteLine("{0:f2}", redPaint);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement