Go for statement print Floyd's Triangle
package main/*from w ww .jav a 2 s. c om*/ import "fmt" func main(){ var rows int var temp int = 1 rows = 9 for i := 1; i <= rows; i++ { for k := 1; k <= i; k++ { fmt.Printf(" %d",temp) temp++ } fmt.Println("") } }