genzou #6507(2008/06/15 00:24 GMT) [ Groovy ] Rating0/0=0.00
Felioさんの回答を参考にしました。
1 2 3 4 5 6 7 8
def print_pyramid( n ){ (1..n).each{ def text = "*"*(2*it - 1) println text.center(2*n + 1) } } print_pyramid(10)
Rating0/0=0.00-0+
[ reply ]
genzou
#6507()
[
Groovy
]
Rating0/0=0.00
Felioさんの回答を参考にしました。
def print_pyramid( n ){ (1..n).each{ def text = "*"*(2*it - 1) println text.center(2*n + 1) } } print_pyramid(10)Rating0/0=0.00-0+
[ reply ]