Advertisement
Guest User

Untitled

a guest
Nov 14th, 2021
106
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace Shapes
  4. {
  5. public class StartUp
  6. {
  7. static void Main(string[] args)
  8. {
  9. Shape rectangle = new Rectangle(5, 19);
  10. Shape circle = new Circle(5);
  11.  
  12. Console.WriteLine(rectangle.Draw());
  13. Console.WriteLine($"Perimeter: {rectangle.CalculatePerimeter():F2}");
  14. Console.WriteLine($"Area: {rectangle.CalculateArea():F2}");
  15. Console.WriteLine(circle.Draw());
  16. Console.WriteLine($"Perimeter: {circle.CalculatePerimeter():F2}");
  17. Console.WriteLine($"Area: {circle.CalculateArea():F2}");
  18. }
  19. }
  20. }
  21.  
Advertisement
RAW Paste Data Copied
Advertisement