mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:55:28 +08:00
27 lines
426 B
Go
Executable File
27 lines
426 B
Go
Executable File
// rectangle_stars.go
|
|
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
w, h := 20, 10
|
|
for y := 0; y < h; y++ {
|
|
for x := 0; x < w; x++ {
|
|
fmt.Print("*")
|
|
}
|
|
fmt.Println()
|
|
}
|
|
}
|
|
/* Output:
|
|
********************
|
|
********************
|
|
********************
|
|
********************
|
|
********************
|
|
********************
|
|
********************
|
|
********************
|
|
********************
|
|
********************
|
|
*/
|