题解 | #学生信息II#
学生信息II
http://www.nowcoder.com/practice/8db171fe5e1542f4a8beaf7268067548
创建结构体 放进去即可
import "fmt"
type stu struct {
name string
sex bool
age int
score int
}
func main() {
a := stu{
name: "小明",
age: 23,
sex: true,
score: 88,
}
fmt.Println(a.name)
fmt.Println(a.sex)
fmt.Println(a.age)
fmt.Println(a.score)
}