彪彪
openkore
全部博文(50)
C编程(0)
软件工具(0)
c++入门(2)
openkore(0)
2010年(38)
2009年(12)
kevin258
wsy52081
ddmumahh
vincerma
raveh
mwx1234
chen_xue
zjwmv
zpbobo11
分类:
2009-12-09 15:43:00
#!user/bin/perluse strict;###乘法口诀表foreach(1..9){for (my $num = 1;$num <= $_; $num++){printf("%5d",$num*$_) ;}print "\n";}print "\n";
##方法二for (my ($line,$num)=(1,1);$line <= 9 and $num <= 9; $line++){if ($num <= $line){ foreach (1..$line){ printf("%5d",$line*$_)} print "\n"; }else{ $num = 1; }}
foreach(1..9){for(my $n=1;$n<=$_;$n++){print $n*$_." "};print "\n";}
for my $n(1..9){map{print $n*$_,' '} 1..$n;print "\n";}
print"@{[map$_*$r,1..++$r]}\n"for 1..9
上一篇:PERL 二维数组排序
下一篇:C++二维字符数组
登录 注册