//等遍三角输出
class San
def san(b)$i=0
while $i<b do
$p=0
while $p<=b-$i do
print " "
$p +=1
end
$j=0
while $j<=$i do
print "* "
$j +=1
end
$i +=1
puts ""
end
end
end
sanjiao=San.new
sanjiao.san(7)
//等腰三角输出
class San
def san(b)
$i=1
while $i<=b do
$p=1
while $p<=b-$i do
print " "
$p +=1
end
$j=1
while $j<=2*$i-1 do
print "*"
$j +=1
end
$i +=1
puts ""
end
end
end
sanjiao=San.new
sanjiao.san(6)