A+B: Difference between revisions

530 bytes added ,  14 years ago
(added GolfScript)
Line 248:
=>7
</lang>
=={{header|D}}==
As in the Python version.
===Console===
<lang d>import std.stdio: readln, writeln;
import std.conv: to;
import std.string: split;
 
void main() {
auto r = readln().split();
writeln(to!int(r[0]) + to!int(r[1]));
}</lang>
===File===
<lang d>import std.stdio: writeln, File;
import std.conv: to;
import std.string: split;
 
void main() {
auto fin = File("input.txt", "r");
auto fout = File("output.txt", "w");
auto r = fin.readln().split();
fout.writeln(to!int(r[0]) + to!int(r[1]));
}</lang>
 
=={{header|F Sharp|F#}}==
<lang fsharp>open System
Anonymous user