a= 0
while(a<9)do
local s=""
b= 0
a=a+1
while(b<9)do
b=b+1
if (b<=a) then
s=s..a.."x"..b.."="..a*b
if a~=b then
s=s.."\t"
end
end
end
print(s)
end
a=10
while(a>1)do
local s = ""
a=a-1
b=0
while(b<9)do
b=b+1
if(b<=a)then
s=s..string.format( "%dX%d=%d\t",a,b,a*b )
end
end
print(s)
end
Lua while循环九九乘法表
猜你喜欢
转载自blog.csdn.net/fanstasic/article/details/80507320
今日推荐
周排行