Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void TotalAreaCalculating(int a, int b, int h)
- {
- Rectangle rectangle = new Rectangle(a, b);
- Cuboid cuboid = new Cuboid(a, b, h);
- TriangularPrism prism = new TriangularPrism(a, h);
- double RectanglesArea = rectangle.Area();
- double CuboidsArea = cuboid.Area();
- double PrismsArea = prism.Area();
- Console.WriteLine("\r\nTotal area of all figures: "
- + Math.Round((RectanglesArea + CuboidsArea + PrismsArea), 3));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement