Anonymous user
Multiplication tables: Difference between revisions
→{{header|AppleScript}}
Line 53:
<lang AppleScript >set n to 12 -- Size of table.
repeat with x from 0 to n
if x = 0 then set {
repeat with y from 0 to n
if y's contents = 0 then
if x > 0 then set
if x = -1 then set {
else
if y ≥ x then set end of
if y < x then set end of
end if
end repeat
set end of
end repeat
return
-- Handler/Function for formatting fixed width integer string.
Line 71:
set text item delimiters to ""
return (characters -4 thru -1 of (" " & x)) as string
end f</lang>Output:
<pre>"
x 1 2 3 4 5 6 7 8 9 10 11 12
|