C
[color]
#include <stdio.h>
int main(int argc, char*argv[])
{
int a,b,c;
scanf("%d",&a);
scanf("%d",&b);
c = a+b;
printf("%d\n",c);
}
%> gcc -o add add.c
%> ./add
[/color]
Java
import java.io.*;
public class Addup
{
static public void main(String args[]) {
InputStreamReader stdin = new InputStreamReader(System.in);
BufferedReader console = new BufferedReader(stdin);
int i1 = 0,i2 = 0;
String s1,s2;
try {
s1 = console.readLine();
i1 = Integer.parseInt(s1);
s2 = console.readLine();
i2 = Integer.parseInt(s2);
}
catch(IOException ioex) {
System.out.println("Input error");
System.exit(1);
}
catch(NumberFormatException nfex) {
System.out.println("\"" + nfex.getMessage() + "\" is not numeric");
System.exit(1);
}
System.out.println(i1 + " + " + i2 + " = " + (i1+i2));
System.exit(0);
}
}
%> javac Addup.java
%> java Addup
Python
import sys
a = sys.stdin.readline()
b = sys.stdin.readline()
c = int(a) + int(b)
print c
%> python add.py
which can be shortened to...
a = input()
b = input()
c = a + b
print c
%> python add.py
Point: Python is by no means as fast as a compiled C program, because it is a running parser, but is fast among languages of its kind, e.g Perl. However it makes up for the speed in development and debugging time, considering writing the python example above and testing it takes less than a minute and it's by far the easiest to learn.
My 2 cents