Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
(def n (Integer/parseInt (read-line)))
IDENTIFICATION DIVISION.
PROGRAM-ID. stdin.
PROCEDURE DIVISION.
ACCEPT n
STOP RUN.
n = String.to_integer IO.gets ""
integer :: n
read (*,*) n
n <- (read :: String -> Int) <$> getContents
const {createInterface} = require('readline')
const rl = createInterface ({
input: process.stdin,
output: process.stdout
})
rl.question('Input an integer: ', response => {
let n = parseInt (response)
// stuff to be done with n goes here
rl.close()
})
(setf n (read-from-string (remove-if-not #'digit-char-p (read-line))))
n = io.read("n")
scanf("%d",&n);
fscanf(STDIN, "%d\n", $n);
read(n);
my $n = <> + 0; # read a line from STDIN, add 0 to convert to int
n = int(input("Input Prompting String: "))
n = int(input())
n = $stdin.gets.to_i
fn get_input() -> String {
let mut buffer = String::new();
std::io::stdin().read_line(&mut buffer).expect("Failed");
buffer
}
let n = get_input().trim().parse::<i64>().unwrap();