A+B: Difference between revisions

Content added Content deleted
(alphabetical)
(Added Oz.)
Line 193: Line 193:
=={{header|OCaml}}==
=={{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|Oz}}==
<lang oz>declare
class TextFile from Open.file Open.text end

StdIn = {New TextFile init(name:stdin)}

fun {ReadInt}
{String.toInt {StdIn getS($)}}
end
in
{Show {ReadInt}+{ReadInt}}</lang>


=={{header|Pascal}}==
=={{header|Pascal}}==