Commit 96139cc8 authored by Adithya C. Ganesh's avatar Adithya C. Ganesh 💬

Add more lecture code

parent 23fb9ae5
Pipeline #44027932 passed with stage
in 5 minutes and 8 seconds
......@@ -66,4 +66,9 @@ data Color2 = Red2 | Green2 | Blue2
deriving (Read, Show, Eq, Ord)
-- Show that eq is automatically derived.
readShowDouble = do
putStrLn "Please enter a Double:"
inpStr <- getLine
let inpDouble = (read inpStr)::Double
putStrLn ("Twice " ++ show inpDouble ++ " is " ++ show (inpDouble * 2))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment