题解 | #学生信息III#
学生信息III
https://www.nowcoder.com/practice/e385b75257c64296bffa415d3c05fbf0
package main import ( "fmt" ) type Qt struct{ city string pe string } type TX struct { name string xb bool age int fx int Qt } func main() { res := TX { name:"小明", xb : true, age: 23, fx : 88, Qt: Qt{ city :"长沙市", pe: "湖南省", }, } fmt.Printf("%v\n%v\n%v\n%v\n%v\n%v\n", res.name,res.xb,res.age,res.fx,res.Qt.pe,res.Qt.city) }