Go Program to Print Inverted Right Triangle of Descending Order Numbers

Write a Go program to print the inverted right triangle of numbers in descending or decreasing order pattern using for loop.

package main

import "fmt"

func main() {

	var i, j, row int

	fmt.Print("Enter Inverted Right Triangle of Descending Order Num Rows = ")
	fmt.Scanln(&row)

	fmt.Println("Inverted Right Triangle of Descending Order Numbers Pattern")

	for i = row; i >= 1; i-- {
		for j = i; j >= 1; j-- {
			fmt.Printf("%d ", j)
		}
		fmt.Println()
	}
}
Go Program to Print Inverted Right Triangle of Descending Order Numbers

About Suresh

Suresh is the founder of TutorialGateway and a freelance software developer. He specialized in Designing and Developing Windows and Web applications. The experience he gained in Programming and BI integration, and reporting tools translates into this blog. You can find him on Facebook or Twitter.