Logo

Programming-Idioms

History of Idiom 120 > diff from v11 to v12

Edit summary for version 12 by :
New Go implementation by user [Logiraptor]

Version 11

2016-02-17, 01:47:44

Version 12

2016-02-17, 04:11:16

Idiom #120 Read integer from stdin

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

Idiom #120 Read integer from stdin

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

Imports
import "fmt"
Code
var i int
fmt.Scan(&i)
Demo URL
http://play.golang.org/p/LyKGMHch7R