Scanf.scanf "%d %d" (fun a b -> Printf.printf "%d." (a / b); let rec loop i rest = if i = 50 then print_newline () else let rest = rest * 10 in let () = Printf.printf "%d" (rest / b) in let rest = rest mod b in loop (i + 1) rest in loop 0 (a mod b) )