let f a b = Printf.sprintf "%dx%d=%d\n" a b (a * b) in
let rec loop2 a b = if b < 10 then (f a b) ^ (loop2 a (b + 1)) else "" in
let rec loop1 a = if a < 10 then (loop2 a 1) ^ (loop1 (a + 1)) else "" in
print_string (loop1 1)