I'm starting to learn the OCaml language. Can you please tell me why this code shows an error?
let unite x =
if x < 100 then x mod 10
else if x >= 100 then x mod 100;;
let dizaine x =
if x < 100 then x / 10
else if x >= 10 then unite(x / 10);;
let centaine x =
if x >= 100 then x / 100;;
let somme_chiffre x =
if x >= 100 then unite x + dizaine x + centaine x
else if x > 9 then unite x + dizaine x
else unite x;;
let div3 x = if ((somme_chiffre x) mod 3) = 0 then 1 else 0;;
print_int(div3 32);;
print_string("\n");;
The error is: File "./test.ml", line 3, characters 24-33: Error: This expression has type int but an expression was expected of type unit