mirror of
https://github.com/c0de-archive/hacktoberfest-2018.git
synced 2025-01-03 08:22:39 +00:00
Merge pull request #181 from grendach/master
hacktoberfest. read user input from console
This commit is contained in:
commit
9169bea20b
12
code/golang/read_input.go
Normal file
12
code/golang/read_input.go
Normal file
@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("Hi! Please enter your name...")
|
||||
var inpt string
|
||||
fmt.Scan(&inpt)
|
||||
fmt.Printf("Hello %s, welcome on Hacktoberfest!\n", inpt)
|
||||
}
|
Loading…
Reference in New Issue
Block a user