This language bar is your friend. Select your favorite languages!

Idiom #120 Read integer from stdin

Read an integer value from the standard input into variable n.

#Edit dateEdit SummaryEditor
👁 Δ 32 2018-11-23, 05:41 [C] None of the other languages had main function stuff. garu
👁 Δ 31 2018-06-24, 08:10 [Go] Missing import programming-idioms.org
👁 Δ 30 2018-06-24, 08:09 [Go] Better not ignore the error programming-idioms.org
👁 Δ 29 2018-06-24, 08:08 New Go implementation by user [programming-idioms.org] programming-idioms.org
👁 Δ 28 2018-06-24, 08:03 [Go] Octal: comment, demo programming-idioms.org
👁 Δ 27 2018-03-21, 21:32 New Elixir implementation by user [Okx] Okx
👁 Δ 26 2016-11-18, 10:36 [PHP] Var name is n. No need to echo. programming-idioms.org
👁 Δ 25 2016-11-18, 10:35 [Rust] Comment emphasize programming-idioms.org
👁 Δ 24 2016-11-17, 14:33 New Rust implementation by user [bratushka.v] bratushka.v
👁 Δ 23 2016-10-02, 16:15 [C] Proper imports programming-idioms.org
👁 Δ 22 2016-06-05, 11:49 [Go] Better demo: works in the Playground programming-idioms.org
👁 Δ 21 2016-05-29, 13:37 [Go] +DocURL programming-idioms.org
👁 Δ 20 2016-04-07, 08:21 [Lua] store the read input in variable n
👁 Δ 19 2016-04-07, 08:20 New Lua implementation by user [Nepta]
👁 Δ 18 2016-04-06, 20:00 [Ruby] variable assignment added.
👁 Δ 17 2016-04-06, 20:00 New Ruby implementation by user [steenslag]
👁 Δ 16 2016-02-18, 18:57 [Go] Var name is n. It is given, needs not be declared.
👁 Δ 15 2016-02-18, 16:58 [Python] spelling mistake.
👁 Δ 14 2016-02-17, 05:53 [Python] spelling mistake.
👁 Δ 13 2016-02-17, 05:53 New Python implementation by user [Trshant]
👁 Δ 12 2016-02-17, 04:11 New Go implementation by user [Logiraptor]
👁 Δ 11 2016-02-17, 01:47 [PHP] removing unnecessary comment
👁 Δ 10 2016-02-17, 01:47 New PHP implementation by user [nvius]
👁 Δ 9 2016-02-16, 19:09 New Haskell implementation by user [JH]
👁 Δ 8 2016-02-15, 12:13 [Cpp] Proper imports
👁 Δ 7 2016-02-12, 22:54 New D implementation by user [cym13]
👁 Δ 6 2016-02-12, 11:49 New Cpp implementation by user [Roboticus]
👁 Δ 5 2016-02-12, 11:48 New C implementation by user [Roboticus]
👁 Δ 4 2016-02-12, 11:36 New Perl implementation by user [Roboticus]
👁 Δ 3 2016-02-07, 21:18 [Pascal] Removed var/begin/end.
👁 Δ 2 2016-02-07, 15:44 New Pascal implementation by user [Bart]
1 2016-02-04, 10:59 Idiom creation by user [programming-idioms.org]