A+B program on different languages.

Perl

#!/bin/perl -p
$_+=<>;

Python

a = int (input(''))
b = int (input(''))
print(a+b, end="")

Ruby

a = Integer(gets)+Integer(gets)
puts a

Erlang

main(_) ->
        {ok, [A,B]} = io:fread("","~d~d"),
        C=A+B,
        io:fwrite("~p",[C]).

Bash

read a;read b;let a=a+b;echo $a

Haskell

import System.IO

main :: IO ()
main  = do
        a <- getLine
        b <- getLine
        let aa = read a :: Int
        let bb = read b :: Int
        let cc = aa + bb
        putStr . show $ cc

Nodejs

String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g, '');};

process.stdin.resume();
var sum = 0;

process.stdin.on('data', function(chunk) {
        var arr = chunk.toString().trim().split("\n");
        for (i =0; i < arr.length; ++i)
             sum+=parseInt(arr[i]);
});

process.stdin.on('end', function() {
  process.stdout.write(sum.toString());
});

Php

<?php
$n1 = trim(fgets(STDIN));
$n2 = trim(fgets(STDIN));
print $n1 + $n2;
?>

Golfscript

~+

Befunge

&&+.@

Pyth

+Qsw

Cjam

riri+

Julia

function AB()
  input = int(readline(STDIN)) + int(readline(STDIN))
  println(input)
end
AB()

Lua

a,b = io.read("*number", "*number")
print(a+b)