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 issue1
- {
- class Program
- {
- static void Main(string[] args)
- {
- //input
- double lenghtA = double.Parse(Console.ReadLine());
- double HeightB =double.Parse(Console.ReadLine());
- double onesidebody = lenghtA * (lenghtA / 2);
- double backsidesqyare =(lenghtA/2)*(lenghtA / 2);
- double backsidetriangle = (lenghtA / 2) *( HeightB - (lenghtA / 2));
- double backsidetrianglee = backsidetriangle / 2;
- double backside = backsidesqyare + backsidetrianglee;
- double door =(lenghtA/5)*( lenghtA / 5);
- double frontside = (backsidetrianglee + backsidesqyare) - door;
- double roofoneside = lenghtA * (lenghtA / 2);
- double roof = 2 * roofoneside;
- double house = backside + frontside + (2 * onesidebody);
- double greenPaint = house / 3;
- double redpaint = roof / 5;
- Console.WriteLine("{0:f2}",greenPaint);
- Console.WriteLine("{0:f2}",redpaint);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment