Go Program to Print Same Numbers in Square Rows and Columns

Write a Go program to print the same numbers in square number pattern rows and columns using for loop.

package main

import "fmt"

func main() {

	var i, j, k, row int

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

	fmt.Println("Same Numbers in Sqaure Rows & Columns Pattern")

	for i = 1; i <= row; i++ {
		for j = i; j < row+1; j++ {
			fmt.Printf("%d ", j)
		}
		for k = 1; k < i; k++ {
			fmt.Printf("%d ", k)
		}
		fmt.Println()
	}
}
Go Program to Print Same Numbers in Square Rows and Columns