f :: [String] -> IO()
f [a,op,b]
    | op == "+" = print $ read a  + read b
    | op == "-" = print $ read a  - read b
    | op == "*" = print $ read a  * read b
    | op == "/" = print $ read a  `div` read b
    | op == "?" = return()
main = getContents >>= mapM_ f . ( map words ) . lines
