Golang新手,在练习代码时遇到这样情况,百思不得解,求社区大神指导:
代码:
```go
// 要求编译一个程序,实现输出❤的形状。
package main
import "fmt"
func main (){
fmt.Println("*\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t*\n",
"\t\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\n",
"\t\t\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\n",
"\t\t\t\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\n",
"\t\t\t\t\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\n",
"\t\t\t\t\t\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\n",
"\t\t\t\t\t\t\t*\t*\t*\t*\t*\t*\t*\t*\t*\t*\n",
"\t\t\t\t\t\t\t\t*\t*\t*\t*\t*\t*\t*\t*\n",
"\t\t\t\t\t\t\t\t\t*\t*\t*\t*\t*\t*\n",
"\t\t\t\t\t\t\t\t\t\t*\t*\t*\t*\n",
"\t\t\t\t\t\t\t\t\t\t\t*\t*" )
}
```
执行后的情况,见下图:
![问题.png](https://static.studygolang.com/181017/b8e496d5c9201210334c71cc0285152a.png)
明显看出红框内排列不对称。
求大神指导。
有疑问加站长微信联系(非本文作者))