Implementation
Lua

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating resource.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
import java.util.Scanner;
Scanner in = new Scanner(System.in);
n = in.nextInt();
read(n);
my $n = <> + 0;  # read a line from STDIN, add 0 to convert to int
#include <stdio.h>
#include <stdlib.h>
char inbuff[1000];

if (!fgets(inbuff, sizeof(inbuff), stdin))
   fabort("Can't read from input");
int n = atoi(inbuff);
printf("You entered %d\n", n);
#include <iostream>
std::cin >> n;
import std.stdio;
readf("%d", &n);
n <- (read :: String -> Int) <$> getContents
fscanf(STDIN, "%d\n", $n);
import "fmt"
_, err := fmt.Scan(&n)
input_var = int(raw_input("Input Prompting String: "))
n = gets.to_i
fn get_input() -> String {
    let mut buffer = String::new();
    std::io::stdin().read_line(&mut buffer).expect("Failed");
    buffer
}

let x = get_input().trim().parse::<i64>().unwrap();
n = String.to_integer IO.gets ""
import "fmt"
_, err := fmt.Scanf("%d", &n)