Objective: Learn about applying multiple guards
Recap: Nested Function + Guard + Where
Download Link: tinyurl.com/68cjve
Download this file: numberRoot.rar
numberRoots a b c
(...) | quadraticEquation > 0 = 2
(...) | quadraticEquation == 0 = 1
(...) | quadraticEquation < 0 = 0
(...) where quadraticEquation = b*b-4*a*c
#1. Replace (...) with tab/space/indentation
#2. Save the text file as .hs file extension, not .txt
#3. Not required to define data type.
You will need to download and install WinHugs or GHC
to run Haskell scripts (.hs extension files).
Download from Haskell official website haskell.org
Loading more stuff…
Hmm…it looks like things are taking a while to load. Try again?