Jump to content

A+B: Difference between revisions

12 bytes removed ,  14 years ago
no edit summary
(added ocaml)
No edit summary
Line 108:
sum' = sum . map read . words
 
main = getLine >>= (\xs -> putStrLn $ showprint $ sum' xs)
</lang>
 
Line 172:
 
=={{header|OCaml}}==
<lang ocaml>Scanf.scanf "%d %d" (fun a b -> Printf.printf "%d\n" (a + b))</lang>
<lang ocaml>
Scanf.scanf "%d %d" (fun a b -> Printf.printf "%d\n" (a + b))
</lang>
 
=={{header|Pascal}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.