Diamond Pattern
Lesson 6 of 24 in Coddy's Golang Challenges - Level 1 course.
Challenge
EasyWrite a function that takes a number as input and prints a diamond pattern with the numbers increasing from 1 to the input number.
Example: If the input is 5, the output should be:
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5Try it yourself
import "fmt"
func printDiamondPattern() {
}All lessons in Golang Challenges - Level 1
1Introduction
Introduction2Play With Numbers
Sum And DivideGenerate PatternNumber RotationEven and Divisible NumbersDiamond PatternAbundant NumberCheck a Number