From 525cf5908bebd1a97f803810b8ae318bffbd6fe4 Mon Sep 17 00:00:00 2001 From: Carlos Sosa Date: Wed, 25 Sep 2019 09:27:43 -0700 Subject: Almost done with ex 2.4 --- ex2/Main.hs | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'ex2/Main.hs') diff --git a/ex2/Main.hs b/ex2/Main.hs index 7e32c4a..74d0054 100644 --- a/ex2/Main.hs +++ b/ex2/Main.hs @@ -1,4 +1,28 @@ -import Shape +import Shape +main :: IO () main = do - putStrLn $ show $ square 5.0 + putStrLn "Convex Polygon:" + putStrLn + $ show + $ area + (polygon + [ (550, 450) + , (455, 519) + , (491, 631) + , (609, 631) + , (645, 519) + ] + ) + putStrLn "Concave Polygon:" + putStrLn + $ show + $ area + (polygon + [ (550, 580) + , (455, 519) + , (491, 631) + , (609, 631) + , (645, 519) + ] + ) -- cgit v1.3-2-g0d8e