read user input

This commit is contained in:
grendach 2018-10-06 16:43:43 +02:00
parent 3f1d1da695
commit c2b8a7c667

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, wellcome on Hacktoberfest!\n", inpt)
}