mirror of
https://github.com/c0de-archive/hacktoberfest-2018.git
synced 2024-12-22 13:22:39 +00:00
read user input
This commit is contained in:
parent
3f1d1da695
commit
c2b8a7c667
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, wellcome on Hacktoberfest!\n", inpt)
|
||||
}
|
Loading…
Reference in New Issue
Block a user