Print an Integer (Entered by the User)
In this program, integer entered by the user is stored in a variable using the
io.read function. Then, that variable is displayed on the screen.
-- read_from_stdin.lua -- read an integer from the user, store it in a variable then print the variable on the screen. function ReadFromStdin( ) print('please enter an integer ...'); n = io.read(); print('the integer is '..n); end ReadFromStdin();