Advertisement
Spocoman

04. Triangle of Dollars

Sep 25th, 2024
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.20 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.     "fmt"
  5.     "strings"
  6. )
  7.  
  8. func main() {
  9.     var n int
  10.     fmt.Scanln(&n)
  11.    
  12.     for  i := 1; i <= n; i++ {
  13.         fmt.Println(strings.Repeat("$ ", i))
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement