Difference between revisions of "User:Hajo/test2"
Jump to navigation
Jump to search
(x,y,z) |
m (→Prog1: string.format()) |
||
Line 15: | Line 15: | ||
for x = -n, n do | for x = -n, n do | ||
for z = -n, n do | for z = -n, n do | ||
− | print(x,y,z) | + | --print(x,y,z) |
+ | print( string.format("%2d %2d %2d", x,y,z) ) | ||
end | end | ||
end | end |
Revision as of 05:29, 11 March 2017
Table-test2
todo
Lua - Online-IDEs
Example - Formatting a table:
Prog1
n=1
y=0
for x = -n, n do
for z = -n, n do
--print(x,y,z)
print( string.format("%2d %2d %2d", x,y,z) )
end
end
Output
...