Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. private void TotalAreaCalculating(int a, int b, int h)
  2.         {
  3.             Rectangle rectangle = new Rectangle(a, b);
  4.             Cuboid cuboid = new Cuboid(a, b, h);
  5.             TriangularPrism prism = new TriangularPrism(a, h);
  6.             double RectanglesArea = rectangle.Area();
  7.             double CuboidsArea = cuboid.Area();
  8.             double PrismsArea = prism.Area();
  9.             Console.WriteLine("\r\nTotal area of all figures: "
  10.                 + Math.Round((RectanglesArea + CuboidsArea + PrismsArea), 3));
  11.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement