Advertisement
Spocoman

01. Rectangle of 10 x 10 Stars(with or not strings.Repeat())

Sep 25th, 2024 (edited)
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.36 KB | None | 0 0
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.    
  7.     for i := 0; i < 10; i++ {
  8.         for j := 0; j < 10; j++ {
  9.             fmt.Print("*")
  10.         }
  11.         fmt.Println()
  12.     }
  13. }
  14.  
  15. ИЛИ:
  16.  
  17. package main
  18.  
  19. import (
  20.     "fmt"
  21.     "strings"
  22. )
  23.  
  24. func main() {
  25.    
  26.     for i := 0; i < 10; i++ {
  27.         fmt.Println(strings.Repeat("*", 10))
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement