Go Program to Print Repeated Characters Pattern

Write a Go program to print the repeated alphabets or characters in each row using for loop.

package main

import "fmt"

func main() {

	var i, j, row, alphabet int

	fmt.Print("Enter Repeated Characters Pattern Rows = ")
	fmt.Scanln(&row)

	fmt.Println("**** Repeated Alphabets/Characters Pattern ****")

	alphabet = 65

	for i = 0; i < row; i++ {
		for j = 0; j <= i; j++ {
			fmt.Printf("%c ", alphabet)
		}
		alphabet++
		fmt.Println()
	}
}
Go Program to Print Repeated Characters Pattern