题解 | #翻转直角三角形图案#
翻转直角三角形图案
http://www.nowcoder.com/practice/2cdea429fa414fbba26e6c821724ca06
用Go的人有点少啊
package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
func main() {
sc := bufio.NewScanner(os.Stdin)
for sc.Scan() {
a, _ := strconv.Atoi(sc.Text())
for i := a; i > 0; i-- {
s := ""
for j := 0; j < i; j++ {
s += "* "
}
fmt.Println(s)
}
}
}