style: begin/end
This commit is contained in:
4
gcd.ml
4
gcd.ml
@@ -6,10 +6,10 @@ let rec gcd a b =
|
||||
let main () =
|
||||
let len = Array.length Sys.argv in
|
||||
Printf.printf "array length %d\n" len;
|
||||
if len < 3 then (
|
||||
if len < 3 then begin
|
||||
Printf.printf "must have 2 args";
|
||||
exit 0;
|
||||
);
|
||||
end;
|
||||
let a = int_of_string Sys.argv.(1) in
|
||||
let b = int_of_string Sys.argv.(2) in
|
||||
Printf.printf "gcd of %d and %d is %d\n" a b (gcd a b);
|
||||
|
||||
Reference in New Issue
Block a user