Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OCAML
- let pole (a,b,c) =
- let
- abs x =
- if(x<0.) then -.x
- else x
- and
- p = (a+.b+.c)/.2.
- in
- if(abs(b-.c)<a && a<(b+.c)) then sqrt (p*.(p-.a)*.(p-.b)*.(p-.c))
- else raise (Failure "Nie da sie zbudowac trojkata");;
- OZ...
- declare fun {Zad1 A#B#C}
- local fun {Abs X}
- if X<0 then -X
- else X end
- end
Add Comment
Please, Sign In to add comment