let op x = match x with
    "+" -> (+)
  | "-" -> (-)
  | "*" -> ( * )
  | "/" -> (/)
  | _ -> (fun x -> fun x -> x);;

let rec read () =
  let f x y z = match (x,y,z) with
    (_,"?",_) -> ()
    | (x,y,z) -> Printf.printf "%d\n" ((op y) x z);read ()
  in
  Scanf.scanf "%d %s %d\n" f;;

 let () = read ();;