• + 0 comments

    My code in golang:

    func staircase(n int32) {
        new := int(n)
        for i := 1; i <= new; i++{
            for j := 0; j < new - i; j++{
                fmt.Printf(" ")
            }
            for k := 0; k < i; k++{
                fmt.Printf("#")
            }
            fmt.Println()
        }
    }