Multiplication tables: Difference between revisions

Content added Content deleted
Line 755: Line 755:
<lang apl>⎕←(' ×',2↑' '),4 0⍕⍳12⋄{⎕←((4 0⍕⍵),⊂1(4×(⍵-1))⍴' '),4 0⍕(⍵-1)↓(⍵×⍳12)}¨⍳12</lang>
<lang apl>⎕←(' ×',2↑' '),4 0⍕⍳12⋄{⎕←((4 0⍕⍵),⊂1(4×(⍵-1))⍴' '),4 0⍕(⍵-1)↓(⍵×⍳12)}¨⍳12</lang>


{{works with|GNU APL}}
After printing the table, GNU APL will will output the value of the expression that produced it, so in addition to adjusting the header spacing this solution uses <tt>⍬⊣</tt> to throw that value away.
After printing the table, GNU APL will will output the value of the expression that produced it, so in addition to adjusting the header spacing this solution uses <tt>⍬⊣</tt> to throw that value away.


{{works with|GNU APL}}
<lang apl>⎕←(' ×',4↑' '),4 0⍕⍳12⋄⍬⊣{⎕←((4 0⍕⍵),⊂1(4×(⍵-1))⍴' '),4 0⍕(⍵-1)↓(⍵×⍳12)}¨⍳12</lang>
<lang apl>⎕←(' ×',4↑' '),4 0⍕⍳12⋄⍬⊣{⎕←((4 0⍕⍵),⊂1(4×(⍵-1))⍴' '),4 0⍕(⍵-1)↓(⍵×⍳12)}¨⍳12</lang>