让最终形成:
2:4
3:5
4:6
5:7
6:8
~~~
func main() {
new_start := 2
new_end := 6
old_start := 4
old_end := 8
for i := new_start; i <= new_end; i++ {
for j := old_start; j <= old_end; j++ {
fmt.Println(i, ":", j)
}
}
/*
让最终形成:
2:4
3:5
4:6
5:7
6:8
*/
}
~~~
有疑问加站长微信联系(非本文作者)