all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
open random number list console format read
|
||||
|
||||
run () =
|
||||
writen "Please enter 11 numbers:" $
|
||||
xs () |> iter
|
||||
where xs () = [0..10] |> map (\_ -> readStr <| readn ())
|
||||
f x = sqrt (toSingle x) + 5.0 * (x ** 3.0)
|
||||
p x = x < 400.0
|
||||
iter [] = ()
|
||||
iter (x::xs)
|
||||
| p res = printfn "f({0}) = {1}" x res $ iter xs
|
||||
| else = printfn "f({0}) :: Overflow" x $ iter xs
|
||||
where res = f x
|
||||
|
||||
run ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue