Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let numberOfSolution(a:float32, b:float32, c:float32): int=
- let delta = (b*b)-(float32(4)*(a*c))
- if delta < float32(0) then 0
- elif delta = float32(0) then 1
- else 2
- let main() =
- seq { while true do yield stdin.ReadLine () }
- |> Seq.takeWhile ((<>) null)
- |> Seq.map (fun x -> x.Split(" "))
- |> Seq.iter (fun x -> System.Console.WriteLine(numberOfSolution(float32(x.[0]), float32(x.[1]), float32(x.[2]))))
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement