mirror of
https://github.com/c0de-archive/hacktoberfest-2018.git
synced 2025-09-01 02:29:04 +00:00
read user input
This commit is contained in:
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)
|
||||
}
|
Reference in New Issue
Block a user