Merge pull request #181 from grendach/master

hacktoberfest. read user input from console
This commit is contained in:
Luke Oliff 2018-10-06 10:04:37 -07:00 committed by GitHub
commit 9169bea20b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

12
code/golang/read_input.go Normal file
View 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)
}