[Solved] How to print the star pattern aligned to right hand side in GO lang


package main

import (
    "fmt"
    "strings"
)

func main() {
    for i := 1; i <= 6; i++ {
        fmt.Printf("%6s\n", strings.Repeat("#", i))
    }
}

Try it on the Go playground

1

solved How to print the star pattern aligned to right hand side in GO lang