551
社区成员
官网https://golang.google.cn/dl/
安装完成,并查看版本。
package main
import "fmt"
func main() {
fmt.Println("welcome to menu,please input \"help\" for help ")
for {
var cmd string
fmt.Println(">>")
fmt.Scanln(&cmd)
if cmd == "help" {
fmt.Println("hello---print hello")
fmt.Println("help---show menu")
fmt.Println("quit---quit menu")
} else if cmd == "hello" {
fmt.Println("hello 483")
} else if cmd == "quit" {
fmt.Println("bye")
break
} else {
fmt.Println("error,please input 'help' for help")
}
}
}
推送成功
学号:483